Problems with accents

14 views
Skip to first unread message

jro...@gmail.com

unread,
Oct 22, 2017, 10:57:47 AM10/22/17
to tikzdevice

I can't fathom why the accented "é" in the following ggplot2 graph makes R hangs when using tikzdevice,  whereas it works using simple pdf device.

library(tikzDevice)
library(ggplot2)

options(tikzDefaultEngine = "luatex")


tikzLualatexPackages =c(
  "\\usepackage{tikz}\n",
  "\\usepackage[active,tightpage,psfixbb]{preview}\n",
  "\\usepackage{fontspec,xunicode}\n",
  "\\PreviewEnvironment{pgfpicture}\n",
  "\\setlength\\PreviewBorder{0pt}\n"
)


x<- rnorm(10)
y<- rnorm(10)
df <- data.frame(x=x, y=y)

#### This example works
tikz(standAlone = TRUE)
ggplot(df, aes(x=x, y=y))+geom_point() +xlab("e")
dev.off()
####

#### This example hangs and never completes
tikz(standAlone = TRUE)
ggplot(df, aes(x=x, y=y))+geom_point() +xlab("é")
dev.off()
####

#### Working OK when using pdf device
pdf()
ggplot(df, aes(x=x, y=y))+geom_point() +xlab("é")
dev.off()
####

Thanks for your help
Jacques


Reply all
Reply to author
Forward
0 new messages