You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use latex2exp to render a simple expression in an R figure in the legend text. I want to use "," as the decimal separator. When I do so, the next digit is not rendered, so "0,05" becomes "0,5" in the figure -- both as displayed in R Studio and in exported PDF.
A minimal working example is:
library(latex2exp)
plot(TeX("$h^2=0,05$")) # <--- this does not render correctly
I use latex2exp to render a simple expression in an R figure in the legend text. I want to use "," as the decimal separator. When I do so, the next digit is not rendered, so "0,05" becomes "0,5" in the figure -- both as displayed in R Studio and in exported PDF.
A minimal working example is:
SessionInfo() is:
R is running under R-Studio 2022.12.0 Build 353.
Expected behavior
I expected to see a rendering of "h-squared=0,05"
Actual behavior
What I see on screen and in exported PDF is:
Workaround
Changing the code to
produces the expected output. Thus the problem easy to work around, but I think the behavior of the "TeX" function is not desirable.
Best wishes
The text was updated successfully, but these errors were encountered: