Unable to get tikDevice work

60 views
Skip to first unread message

Sebastien Guyader

unread,
Jun 30, 2015, 9:23:00 AM6/30/15
to tikzd...@googlegroups.com
Hi, I have a problem with tikzDevice. I'm using the latest versions of R (with latest knitr and tikDevice packages) and RStudio, updated TeX Live to 2015 binaries (and I think I have all the required packages).
When I try to output graphics to tikzDevice, compilation hangs. Other graphics devices like PDF or CairoPNG work without a problem.

As an example, I tried to compile the knitr-graphics.Rnw document found in the knitr examples folder from RStudio with XeLaTeX (XeLaTeX is set as the default Latex compiler in RStudio). The first graphics are correctly made to the other graph devices, but it hangs at the first tikzDevice graphics.
What I see is that the compilation produces a file with .tikz extension in the "fig" folder, and if I change the extension to .tex and compile it in TexMaker with XeLaTeX, it produces a correct PDF graphics from tikz (hence tikz is working in my TeX Live installation).

I attached the complete logs from RStudio "Compile PDF" console output pane, and tikzStringWidthCalc.log found in R temporary folder.


tikzStringWidthCalc.log
console_output.txt

Sebastien Guyader

unread,
Jun 30, 2015, 2:23:41 PM6/30/15
to tikzd...@googlegroups.com
In addition, if from R console I run the following command:
knit("knitr-graphics.Rnw")

I get the following error message: 

Quitting from lines 105-107 (knitr-graphics.Rnw) 
Error: failed to compile graphics-two-high-1.tikz to PDF
In addition: Warning message:
running command '"C:\texlive\2014\bin\win32\xelatex.exe" "graphics-two-high-1.tikz"' had status 1

Though, if run xelatex on the graphics file from a windows command prompt, it successfully compiles to PDF.

kirill...@gmail.com

unread,
Nov 18, 2015, 3:49:29 AM11/18/15
to tikzdevice
Sorry for my slow reply. I haven't looked into it too deeply, but at the first glance it looks like in your plot labels or title there's something that LaTeX doesn't understand properly, perhaps a backslash? Please take a look at the "sanitize" argument. A reproducible example (source files that I can run on my machine) would help, too.


-Kirill
Reply all
Reply to author
Forward
0 new messages