[英]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.