当我使用呈现{rmarkdown}从Mac上的.Rmd文件生成pdf文件时,会出现一条错误消息:
pandoc: pdflatex not found. pdflatex is needed for pdf output. Error: pandoc document conversion failed
不过,当我查到
pdflatex -v我得到了
pdfTeX 3.1415926-2.4-1.40.13 (TeX Live 2012)
kpathsea version 6.1.0
Copyright 2012 Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).
There is NO warranty. Redistribution of this software is
covered by the terms of both the pdfTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the pdfTeX source.
Primary author of pdfTeX: Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).
Compiled with libpng 1.5.10; using libpng 1.5.10
Compiled with zlib 1.2.7; using zlib 1.2.7
Compiled with xpdf version 3.03pdflatex安装在我的机器上。
有人能帮我告诉R哪里能找到pdflatex吗?
非常感谢!
发布于 2014-03-18 18:13:11
在升级到OS之后,我发现pdflatex“失踪”有问题(例如,在RStudio中检查包构建时,我收到了一条error tools::texi2pdf pdflatex missing消息)。
/usr/texbin是否存在。
在航站楼:
cd /usr/texbin/Library/TeX/Distributions/.DefaultTeX/Contents/Programs/texbin
在航站楼:
ln -s -s /usr/texbinecho $PATH的结果。确保/usr/texbin存在。如果它不存在,则需要将/usr/texbin添加到PATH变量中。如果您发现自己不得不处理PATH变量,那么安装最新版本的MacTex可能是一个更好的解决方案。
更新:OSX10.11ElCapitan不再允许写入/usr,因此最新版本的MacTeX (2015年)现在在这个系统上为/Library/TeX/texbin而不是/usr/texbin编写了一个链接。
发布于 2015-08-06 00:02:05
对于被困在这里的使用ubuntu的人来说,一个更好的选择(因为它的大小是1/5 )是使用:
sudo apt-get install texlive-latex-base发布于 2016-03-06 22:45:21
对于那些使用扣篮的答案的人(对于使用UBUNTU的人),如果他们得到了Font <font> at <size> not loadable: Metric (TFM) file not found.错误,您还需要:
sudo apt-get install texlive-fonts-recommended texlive-latex-recommended不幸的是,这确实大大扩展了texlive安装的大小,但它仍然是texlive-latex-extra安装的一半大小。
https://stackoverflow.com/questions/22081991
复制相似问题