[英]Knit PDf file from RStudio
我正在尝试从 RStudio 编织 PDf 文件,但出现以下错误:
! LaTeX Error: File `framed.sty' not found.
在尝试从 R Studio 编织 PDF 文件时。
错误 1 :! LaTeX 错误:找不到文件“framed.sty”。
参考: https : //github.com/rstudio/rmarkdown/issues/39
解决方案:
您需要安装带框架的 LaTeX 包。
yum -y install texlive-framed
错误 2 :! LaTeX 错误:找不到文件“title.sty”。
参考: https : //github.com/rstudio/rmarkdown/issues/359
解决方案:
wget http://mirrors.ctan.org/macros/latex/contrib/titling.zip
unzip titling.zip # (might need to sudo yum install unzip)
cd titling
latex titling.ins
sudo mkdir -p /usr/share/texlive/texmf-dist/tex/latex/titling
sudo cp titling.sty /usr/share/texlive/texmf-dist/tex/latex/titling/
sudo texhash
我有一个与titleing.sty类似的问题。 解决方案是安装一个包含丢失文件的包。
在我的 ubuntu 上是:
sudo apt install texlive-latex-extra
请记住,您始终可以使用 apt-file 找到包含给定文件的包:
sudo apt-file search titling.sty
当然,如果您之前没有安装过 apt-file 包,则必须先安装(并刷新文件数据库):
sudo apt install apt-file
sudo apt-file update
根据您的平台,我怀疑破坏性最小的解决方案类似于 Fedora 的解决方案。 我说“破坏性最小”,因为我不必用不同的包替换 TexLive,我只是添加了缺少的组件。 我遵循的过程来自发布到https://askbot.fedoraproject.org/en/answers/94766/revisions/ [请注意页面已移动,因此这只是只读的] 的解决方案,但仍然如此; 它解释了为什么 Fedora 不附带所有 TexLive 组件,更重要的是 - 它解释了如何单独加载它们。 例如,从您的终端,以下将安装缺少的“framed.sty”组件:sudo dnf install“tex(framed.sty)”
解决 framed.sty 问题后,我能够解决 title.sty 错误:
须藤 yum -y 安装 texlive-title
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.