Open kongdd opened 1 year ago
Hmm, works for me:
library(tikzDevice)
## Example 1 ###################################
options(tikzDefaultEngine = 'pdftex')
# options(tikzDefaultEngine = 'xetex')
# options(tikzDefaultEngine = 'luatex')
td <- "."
tf <- file.path(td,'example1.tex')
# Minimal plot
tikz(tf,standAlone=TRUE)
plot(1)
dev.off()
#> png
#> 2
# View the output
tools::texi2dvi(tf,pdf=T)
# system(paste(getOption('pdfviewer'),file.path(td,'example1.pdf')))
# setwd(oldwd)
Created on 2022-07-24 by the reprex package (v2.0.1)
Are you sure you can process LaTeX documents that do not make use of tikzDevice
? Can you please send the output of tikzDevice::tikzTest()
?
Hi, did you resolve this issue? I have the same issue.
The output of tikzDevice::tikzTest() is
tikzDevice::tikzTest()
#>
#> Active compiler:
#> C:\Users\AGO~1\AppData\Roaming\TinyTeX\bin\win32\pdflatex.exe
#> pdfTeX 3.141592653-2.6-1.40.24 (TeX Live 2022)
#> kpathsea version 6.3.4
#> Measuring dimensions of: A
#> Running command: "C:\Users\AGO~1\AppData\Roaming\TinyTeX\bin\win32\pdflatex.exe" -interaction=batchmode -halt-on-error -output-directory "C:\Users\AGO~1\AppData\Local\Temp\Rtmp6ZFyCH\tikzDevice1ab059b944cb" "tikzStringWidthCalc.tex"
#> [1] 7.49817
Created on 2022-08-05 by the reprex package (v2.0.1)
I haven't heard from @kongdd, so not sure if they were able to solve this.
As for your issue:
tools::texi2dvi(tf,pdf=TRUE)
to process a plain .tex
file to PDF? Thank you @rstub.
Sorry for the later response.
I found it might be the problem of tinytex.
When I change to WSL, everything is fine.
Thanks for your help. I tried using MiKTeX instead of Tinytex and it worked.
Thanks for the feedback. I might get back to you once I have a better Windows set-up to test this. After all, using TinyTeX should also work out of the box.
Dear Sir,
Could you give some clue how to solve this issue? PS: I used the tinytex as the latex engine.
Created on 2022-07-22 by the reprex package (v2.0.1)