找不到与tcolorbox.sty相关的LaTeX错误

时间:2019-12-07 11:54:33

标签: jupyter-notebook latex jupyter

每当我尝试以PDF格式下载文件时,LaTeX都会出现问题。 当我尝试这样做时,它给了我以下错误:

! LaTeX Error: File `tcolorbox.sty' not found.
Type X to quit or <RETURN> to proceed ,or enter new name.
(Default extension: sty)Enter file name:! Emergency stop.<read > \usepackage

我已经下载了 tcolorbox zip文件,并将目录拖到tex / latex树中,如README文件中所述,但这两个都不起作用。

最初,我曾经尝试从Jupiter Notebook下载pdf,但这也给了我一个错误:

nbconvert failed: PDF creating failed, captured latex output:
Failed to run "xelatex .\notebook.tex -quiet" command:
This is XeTeX, Version 3.14159265-2.6-0.999991 (TeX Live 2019/W32TeX) (preloaded format=xelatex)
 restricted \write18 enabled.
entering extended mode
! Undefined control sequence.
<*> .\notebook
              .tex -quiet
? 
! Emergency stop.
<*> .\notebook
              .tex -quiet
No pages of output.
Transcript written on ?.

有什么建议吗?

4 个答案:

答案 0 :(得分:17)

使用LaTex的程序包管理器tcolorbox安装tlmgr之后,对于其他依赖项,我也遇到了类似的错误。以下解决方案在终端上的Ubuntu 18.04(64位)上对我有效:

tlmgr update --all --self
tlmgr install tcolorbox
tlmgr install pgf
tlmgr install xcolor
tlmgr install environ
tlmgr install trimspaces
tlmgr install mathpazo
tlmgr install parskip
tlmgr install adjustbox
tlmgr install collectbox
tlmgr install eurosym
tlmgr install ecs
tlmgr install ucs
tlmgr install enumitem
tlmgr install ulem
tlmgr install mathrsfs
tlmgr install jknapltx rsfs
sudo tlmgr install collection-fontsrecommended

此外,使用“将笔记本导出为”选项将文档呈现为PDF不适用于我。我是在命令行jupyter nbconvert --to pdf my_document.ipynb上完成的。如果没有,您可能需要安装nbconvert

如果缺少其他依赖项,请在缺少依赖项的情况下继续运行tlmgr install,直到它起作用为止。我还没有弄清楚那些依赖项属于哪个程序包,因此我对此肮脏的修复程序表示歉意。

答案 1 :(得分:3)

除了奥斯卡的答案,我还必须跑步:

sudo tlmgr install collection-fontsrecommended

成功了

答案 2 :(得分:1)

Arch / Manjaro用户,获取tllocalmgr并关注Oscar's answer

    yay -S tllocalmgr-git
    tllocalmgr update --all --self
    tllocalmgr install <package_name>
    sudo texhash

答案 3 :(得分:0)

我在 Fedora 上遇到了同样的问题

运行

dnf install texlive-collection-latexextra

似乎为我解决了这个问题。我发现本指南 How to fully install Latex in fedora? 对调试我的问题特别有帮助。它提供了安装我需要的乳胶包所需的所有命令

相关问题