Rob*_*ace 6 latex r pandoc rstudio knitr
可重复的例子(如果你有rstudio):
test:
导航到工作目录
在终端(安装了pandoc)类型
pandoc -s test.md -t latex -o test.tex
(结果粘贴在这里)
或者直接转到.pdf跳过tex阶段:
pandoc -s test.md -t latex -o test2.pdf
Run Code Online (Sandbox Code Playgroud)
结果很好,但看起来很多步骤,因为knitr结合了sweave.它应该能够直接从.Rmd转换为.tex或.pdf.对?
Die*_*nne 11
这在http://www.rstudio.com/ide/docs/authoring/markdown_custom_rendering中有记录; 您应该将.Rprofile添加到您的目录中,例如:
options(rstudio.markdownToHTML =
function(inputFile, outputFile) {
system(paste("pandoc", shQuote(inputFile), "-o", shQuote(outputFile)))
}
)
Run Code Online (Sandbox Code Playgroud)
可能需要进行一些修改.由于RStudio中的错误,太糟糕了同样不适用于旋转.
http://support.rstudio.org/help/discussions/problems/4128-spin-and-rprofile