[英]How to compile a pdf in RStudio Markdown?
I've just installed RStudio and I want to knit a pdf document and I get this error message red:我刚刚安装了 RStudio 并且我想编织一个 pdf 文档,我收到这个错误消息红色:
Error: LaTeX failed to compile diapositivas-PRYE-bugfac8d2bfe22dfde4bdebadc8cd65b2798b315d7788f1f7bef1c4c579a8d5f325.tex.
错误:LaTeX 无法编译 diapositivas-PRYE-bugfac8d2bfe22dfde4bdebadc8cd65b2798b315d7788f1f7bef1c4c579a8d5f325.tex。 See https://yihui.org/tinytex/r/#debugging for debugging tips.
有关调试提示,请参阅https://yihui.org/tinytex/r/#debugging 。 Además: Warning messages: 1: In system2(..., stdout = if (use_file_stdout()) f1 else FALSE, stderr = f2): '"pdflatex"' not found 2: In system2(...): '"pdflatex"' not found Ejecución interrumpida
Además:警告消息:1:在 system2(..., stdout = if (use_file_stdout()) f1 else FALSE, stderr = f2): '"pdflatex"' not found 2: In system2(...): '" pdflatex"' not found Ejecución interrumpida
No LaTeX installation detected (LaTeX is required to create PDF output).
未检测到 LaTeX 安装(需要 LaTeX 来创建 PDF 输出)。 You should install a LaTeX distribution for your platform: https://www.latex-project.org/get/
您应该为您的平台安装 LaTeX 发行版: https://www.latex-project.org/get/
If you are not sure, you may install TinyTeX in R: tinytex::install_tinytex()
如果不确定,可以在 R 中安装 TinyTeX:tinytex::install_tinytex()
Otherwise consider MiKTeX on Windows - http://miktex.org
否则考虑 Windows 上的 MiKTeX - http://miktex.org
MacTeX on macOS - https://tug.org/mactex/ (NOTE: Download with Safari rather than Chrome strongly recommended)
macOS 上的 MacTeX - https://tug.org/mactex/ (注意:强烈推荐使用 Safari 而不是 Chrome 下载)
Linux: Use system package manager
Linux:使用系统package管理器
I've tried installing the "knitr" package, and run this:我试过安装“knitr”package,然后运行:
install.packages("knitr")
library(knitr)
tinytex::install_tinytex()
but still getting the same error.但仍然得到同样的错误。
Thanks in advance for any help,提前感谢您的帮助,
Ivan.伊万。
I always run into that same problem.我总是遇到同样的问题。 Try knitting it to.html, opening the.html file, and then exporting the.html file to pdf.
尝试将其编织到.html,打开.html文件,然后将.html文件导出到Z4930045BA41974E。
So you've tried this.所以你已经尝试过了。
install.packages("knitr")
library(knitr)
tinytex::install_tinytex()
But try this instead.但是试试这个。 You need to have the tinytex package to use it's install function.
您需要 tinytex package 才能使用它的安装 function。
install.packages("knitr")
library(knitr)
install.packages("tinytex")
tinytex::install_tinytex()
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.