1

I got error msg when converting tex to pdf using texi2pdf function in Rstudio.

tools::texi2pdf('test.tex')

and the error msg I got:

Error in system(paste(shQuote(texi2dvi), if (quiet) "--quiet" else "",  : 
  (converted from warning) running command     '"C:\CTEX\MiKTeX\miktex\bin\texi2dvi.exe" --quiet --pdf "test.tex" --max-iterations=20 -I "C:/Program Files/R/R-3.5.1/share/texmf/tex/latex" -I "C:/Program Files/R/R-3.5.1/share/texmf/bibtex/bst"' had status 1
 1: tools::texi2pdf("test.tex")
 2: texi2dvi(file = file, pdf = TRUE, clean = clean, quiet = quiet, texi2dvi = texi2dvi, texinputs = texinputs, index = index)
 3: system(paste(shQuote(texi2dvi), if (quiet) "--quiet" else "", if (pdf) "--pdf" else "", shQuote(file), extra), intern = TRUE, ignore.stderr = TRUE)
 4: .signalSimpleWarning("running command '\"C:\\CTEX\\MiKTeX\\miktex\\bin\\texi2dvi.exe\" --quiet --pdf \"test.tex\" --max-iterations=20 -I \"C:/Program Files/R/R-3.5.1/share/texmf/tex/latex\" -I \"C:/Program Files/R/R
 5: withRestarts({
.Internal(.signalCondition(simpleWarning(msg, call), msg, call))
.Internal(.dfltWarn(msg, call))
}, muffleWarning = function() NULL)
 6: withOneRestart(expr, restarts[[1]])
 7: doWithOneRestart(return(expr), restart)

I am running windows10, R version 3.5.1 , RStudio 1.1.463 and CTeX_2.9.2.164.

Anyone could help me with this problem? Thanks.

cone001
  • 1,143
  • 3
  • 13
  • 15
  • I think that might be because MikTex is not installed in Program Files & you also need to add the PATH in Windows environment variables. See answer [here](https://stackoverflow.com/questions/44785961/compile-pdf-in-rstudio-works-but-knit2pdf-does-not-work-in-r-or-rstudio/59473725#59473725). – bricx Dec 25 '19 at 19:28

0 Answers0