Rstudio 无法识别 MacTeX MacOSx 10.7.5,无法预览 pdf

标签 r rstudio miktex

我已经创建了一个 .md 文件,但要以 pdf 格式预览它,Rstudio 需要安装 MacTeX。我已经安装了它,阅读自述文件,一切都在那里,终端显示所有包,但 Rstudio 没有看到,并产生以下消息。如何同步这两个程序?如何让 Rstudio 检测到 MacTeX 在那里?

--to latex --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash-implicit_figures --output HelloWorld.pdf --template /Library/Frameworks/R.framework/Versions/3.1/Resources/library/rmarkdown/rmd/latex/default.tex --highlight-style tango --latex-engine pdflatex --variable 'geometry:margin=1in'
pandoc: pdflatex not found. pdflatex is needed for pdf output.
Error: pandoc document conversion failed with error 41
Execution halted

No TeX installation detected (TeX is required to create PDF output). You should install a recommended TeX distribution for your platform:

  Windows: MiKTeX (Complete) - http://miktex.org/2.9/setup
  (NOTE: Be sure to download the Complete rather than Basic installation)

  Mac OS X: TexLive 2013 (Full) - http://tug.org/mactex/
  (NOTE: Download with Safari rather than Chrome _strongly_ recommended)

  Linux: Use system package manager

我使用 Mac OS X 10.7.5 谢谢你!

最佳答案

令人尴尬的答案是多么简单!安装 MacTeX 程序后重启 Rstudio 即可。完成,pdf 创建。

关于Rstudio 无法识别 MacTeX MacOSx 10.7.5,无法预览 pdf,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29828089/

相关文章:

latex - Doxygen & (La)Tex - 使用参数标签时无法创建 PDF

r - 是否可以在 ggplot2 中创建具有不同颜色的平滑、大的 geom_line()?

r - 在条形图下显示值表

r - Rmd 中出现 "long vectors not supported yet"错误,但 R 脚本中没有错误

csv - 使用 MikTex 在 Latex 文档中包含带有 csvsimple 的四列以上的 CSV 文件

r - 由于 LaTeX,.Rmd 编​​译失败

r - 将预测的时间序列与 R 中的原始序列重叠

r - R 中的元素重复与全局重复

r - 在rstudio中提取git信息

r - 如何在 rmarkdown Latex 期间抑制额外空间?