r markdown 到 pdf 输出错误

use*_*746 1 r r-markdown

在 rstudio 中使用 R markdown 编织为 pdf 时出现错误。Knit 到 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
Run Code Online (Sandbox Code Playgroud)

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

詹姆士

小智 5

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

\n\n

大家好,

\n\n

我终于得到了Markdown编织。Here\xe2\x80\x99s 是解决方案的 github 链接: https://github.com/rstudio/rmarkdown/issues/1285#issuecomment-374340175

\n\n
    \n
  1. 确保 Miktex 控制台设置 > 常规 > 即时安装缺少的软件包
  2. \n
  3. 在r studio中安装tinytex的dev版本\ninstall.packages(\'rmarkdown\')\ndevtools::install_github(\'yihui/tinytex\')
  4. \n
  5. 另外,我对此进行了更改:在 R-Studio 工具 > 全局选项中,在 Sweave 选项卡下,尝试更改“Weave Rnw using:”
  6. \n
\n\n

即使我今天什么也没做,这仍然会成为值得纪念的一天。

\n