首页 > 解决方案 > r markdown to pdf 输出错误

问题描述

使用 R markdown 在 rstudio 中将 Knit 转换为 pdf 时出现错误。它可以毫无问题地编织到 html。

我得到的错误是:

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

任何有关如何解决此问题的帮助将不胜感激。

詹姆士

标签: rr-markdown

解决方案


为我解决了上述问题,请参见下文:

大家好,

我终于得到了降价针织。这是解决方案的 github 链接:https ://github.com/rstudio/rmarkdown/issues/1285#issuecomment-374340175

  1. 确保 Miktex 控制台设置 > 常规 > 即时安装缺少的软件包
  2. 在 r studio install.packages('rmarkdown') devtools::install_github('yihui/tinytex') 中安装 tinytex 的开发版本
  3. 另外,我改变了这一点:在 R-Studio 工具 > 全局选项中,在 Sweave 选项卡下,尝试更改“Weave Rnw using:”

如果我今天什么都没做,这仍然会成为值得纪念的一天。


推荐阅读