-
-
Notifications
You must be signed in to change notification settings - Fork 871
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
problem with svg device, expression(), and unicode characters #1831
Comments
Adding to the mystery, the code works if I change fonts using
This |
Let's not the getting out of Rmarkdown and knitr framework still get us the error Using R svg device in R script svg("test.svg")
plot(1, axes=FALSE, type ='n')
## Line A:
mtext(side = 2, text = expression(paste("A")))
## Line B:
mtext(side = 3, text = expression(paste("“B")))
## Line C:
mtext(side = 4, text = expression(paste("C")))
axis(1, at = par()$usr[1:2], labels = c("More", "Less"), tick = FALSE)
dev.off() I get the error when executing Line C part > mtext(side = 4, text = expression(paste("C")))
Error in mtext(side = 4, text = expression(paste("C"))) :
metric information not available for this device When specifying a device for I think this needs to be investigate at the R code level outside of knitr or rmarkdown for a better understanding. Removing the special Hope it helps understand better this |
Yes, confirmed that happens with just the svg device outside of knitr. Thanks. I'm going to close this up and report it elsewhere. |
This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary. |
I am having difficulty using the
svg
device with math expressions and unicode (in this case, left- and right-quotes). This only occurs on my Windows 10 computer; my osx computer seems unaffected. Consider the following Rmardown document:(Note the left-quote in Line B). Compilation fails with the error:
png
I get the output I expect.expression()
from line B, everything works as expected (including the unicode left-quote)knitr
as the Issue Guide suggests, but that did not help.This appears, then, to be an interaction between
svg
,expression
, and unicode.Windows session info (fails on this computer)
OSX session info (no problem on this computer)
By filing an issue to this repo, I promise that
xfun::session_info('knitr')
. I have upgraded all my packages to their latest versions (e.g., R, RStudio, and R packages), and also tried the development version:remotes::install_github('yihui/knitr')
.I understand that my issue may be closed if I don't fulfill my promises.
The text was updated successfully, but these errors were encountered: