在上一个问题knitr2pdf eclipse 中:如何配置?,我尝试设置eclipse与knitr2pdf一起工作,Yihui Xie很友好地给了我一个非常迅速的答案。现在我又被困了一步。
这是我的文件
---
title: "knit2pdf test"
author: "cedric"
date: "27/10/2017"
output: pdf_document
---
```{r}
plot(rnorm(1:10))
```
运行此文件时,我得到以下答案
knit2pdf(input= "C:/workspace/p/example_scripts/test_knit2pdf.Rmd")
processing file: C:/workspace/p/example_scripts/test_knit2pdf.Rmd
|................................ | 50%
ordinary text without R code
|.................................................................| 100%
label: unnamed-chunk-1
output file: test_knit2pdf.md
Error: running 'texi2dvi' on 'test_knit2pdf.md' failed
LaTeX errors:
! Emergency stop
*** (job aborted, no legal \end found)
! ==> Fatal error occurred, no output PDF file produced!
! ==> Fatal error occurred, no output PDF file produced!
In addition: Warning message:
running command '"C:\PROGRA~1\MIKTEX~1.9\miktex\bin\x64\texify.exe" --quiet --pdf "test_knit2pdf.md" --max-iterations=20 -I "C:/Program Files/R/R-3.4.2/share/texmf/tex/latex" -I "C:/Program Files/R/R-3.4.2/share/texmf/bibtex/bst"' had status 1
我试图找到报告类似问题的问题,将 knit2pdf 与 Rmd 文件一起使用,答案是尝试使用渲染而不是 knit2pdf,这不是我想要的。这不是 Eclipse 的问题,但我无法正确运行 knit2pdf。手动运行命令 knit2pdf("test_knit2pdf.Rmd") 得到相同的错误。同样,也许有人会遇到类似的问题并且能够帮助我,我的文件是否格式错误,我错过了什么?
