Open Gitmoid opened 1 year ago
I am having a similar problem with the \rightarrow
operator, which is very problematic for me because I use it quite a lot.
plot(latex2exp::TeX("$\\alpha \\rightarrow \\beta$"))
gives:
This StackOverflow post received an answer that seems to suggest a system font file (*.ttf
) may be outdated, but I haven't had luck with that approach.
Any insights on how to remedy this problem would be very useful.
Here's sessionInfo()
:
R version 4.2.2 (2022-10-31 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19044)
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.utf8 LC_CTYPE=English_United States.utf8
[3] LC_MONETARY=English_United States.utf8 LC_NUMERIC=C
[5] LC_TIME=English_United States.utf8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_4.2.2 postpack_0.5.4 magrittr_2.0.3 cli_3.5.0
[5] tools_4.2.2 glue_1.6.2 rstudioapi_0.14 vctrs_0.5.1
[9] stringi_1.7.8 stringr_1.5.0 lifecycle_1.0.3 rlang_1.0.6
I tried updating to R-Devel build and it has solved the issue. I expect the issue to be fixed in the new version R version 4.3.0 (Already Tomorrow). The release of 4.3.0 (Already Tomorrow) is scheduled for Friday 2023-04-21.
I expect the issue to be fixed in the new version R version 4.3.0 (Already Tomorrow)
I can confirm (with very minimal testing) with the official R v4.3.0 release that this has been fixed -- running the same code I have above now gives:
as expected. Thanks!
I seem to be having troubles displaying mathematical operators and other symbols while using ggplot() and plot() in RStudio. I reinstalled and deleted all R and RStudio folders. I tried opening the graphs in maximized new window. I haven't changed much in settings, only Appearance to Vibrant Ink and Sweave PDF Preview after compile using to RStudio Viewer. Otherwise, all of my RStudios settings should be set to default. Unicode characters work correctly.