3

When I try to knit a .Rmd file to PDF in RStudio, I get the following error:

Output created: regression.pdf
Error in tools::file_path_as_absolute(output_file) : 
  file 'regression.pdf' does not exist
Calls: <Anonymous> -> <Anonymous>
In addition: Warning messages:
1: running command '"pdflatex" -halt-on-error -interaction=batchmode "regression.tex"' had status 1 
2: In readLines(logfile) : incomplete final line found on 'regression.log'
Execution halted

I have previously tried a couple of things as per other suggestions on here (installing MiKTeX; installing Pandoc) and installing whatever packages are suggested in previous error messages I have seen. Does anybody know a way around this issue? I have seen various posts about difficulties with Knit to PDF on here, but none identical to this one.

hawkaterrier
  • 368
  • 3
  • 15
  • Is [there](https://stackoverflow.com/q/26616202/5784831) and good hint? – Christoph Mar 16 '18 at 11:08
  • Afraid not. Firstly, that issue is explicitly not related to RStudio's built-in Knit feature. Nevertheless I did try following the method used there, but got a different error: Error: Failed to compile regression.tex. In addition: Warning message: running command '"pdflatex" -halt-on-error -interaction=batchmode "regression.tex"' had status 1 – hawkaterrier Mar 16 '18 at 11:17
  • Do you have a reproducible example? Please also provide `devtools::session_info(c('rmarkdown', 'tinytex'))`. It might be the same issue as https://github.com/rstudio/rmarkdown/issues/1285 but the problem is I have tried many times without being able to reproduce the problem. – Yihui Xie Mar 16 '18 at 17:19

0 Answers0