我安装了 sharelatex 社区版的 docker 镜像,并在 docker 容器内使用 tlmgr 命令安装了 texlive scheme-full。
当我尝试编译我的一个项目时,出现错误:
LaTeX Font Info: Try loading font information for U+ifclk on input line 5.
(/usr/local/texlive/2015/texmf-dist/tex/latex/ifsym/uifclk.fd))
Package atveryend Info: Empty hook `BeforeClearDocument' on input line 153.
Package babel Info: Redefining ngerman shorthand "|
(babel) in language on input line 153.
Package babel Info: Redefining ngerman shorthand "~
(babel) in language on input line 153.
Package babel Info: Redefining ngerman shorthand "|
(babel) in language on input line 153.
Package babel Info: Redefining ngerman shorthand "~
(babel) in language on input line 153.
[6]
Package atveryend Info: Empty hook `AfterLastShipout' on input line 153.
(/var/lib/sharelatex/data/compiles/56478c32cee7ce41008d473d/output.aux)
Package atveryend Info: Executing hook `AtVeryEndDocument' on input line 153.
Package atveryend Info: Executing hook `AtEndAfterFileList' on input line 153.
Package rerunfilecheck Info: File `output.out' has not changed.
(rerunfilecheck) Checksum: 615863FB9FD710B6690EA564A4BDA59E;128.
Package atveryend Info: Empty hook `AtVeryVeryEnd' on input line 153.
)
Here is how much of TeX's memory you used:
11277 strings out of 493054
176809 string characters out of 6134767
359609 words of memory out of 5000000
14482 multiletter control sequences out of 15000+600000
40642 words of font info for 56 fonts, out of 8000000 for 9000
1141 hyphenation exceptions out of 8191
43i,7n,46p,473b,381s stack positions out of 5000i,500n,10000p,200000b,80000s
{/usr/local/texlive/2015/texmf-dist/fonts/enc/dvips/lm/lm-mathsy.enc}{/usr/lo
cal/texlive/2015/texmf-dist/fonts/enc/dvips/lm/lm-ec.enc}{/usr/local/texlive/20
15/texmf-dist/fonts/enc/dvips/lm/lm-rm.enc}
!pdfTeX error: pdflatex (file ifclk10): Font ifclk10 at 657 not found
==> Fatal error occurred, no output PDF file produced!
它不仅适用于 ifsym 字体,还适用于我使用的所有字体,例如
\usepackage{aurical}
\usepackage{calligra}
\usepackage{yfonts}
\usepackage{uncial}
\usepackage{rustic}
\usepackage{rotunda}
\usepackage{inslrmin}
\usepackage{pbsi}
\usepackage{egothic}
\usepackage{sqrcaps}
如果我使用 find 来查找文件是否存在,我会得到以下输出。
/usr/local/texlive# find . -name "ifclk*"
./2015/texmf-dist/fonts/source/public/ifsym/ifclk.gen
./2015/texmf-dist/fonts/source/public/ifsym/ifclk10.mf
./2015/texmf-dist/fonts/source/public/ifsym/ifclkb10.mf
./2015/texmf-dist/fonts/tfm/public/ifsym/ifclk10.tfm
./2015/texmf-dist/fonts/tfm/public/ifsym/ifclkb10.tfm
看起来一切都存在 - 所以我不知道我在这里做错了什么。有人知道我能做什么吗?
PS:如果我通过 apt-get 命令安装 texlive-full,一切都会正常工作 - 问题是分发包来自 2013 年。
答案1
好吧,如果有人偶然发现了这一点。sharelatex 的 docker 镜像缺少一行重要的代码。
chown sharelatex:sharelatex /var/www/sharelatex
/var/www/sharelatex 是 sharelatex 用户的主目录,如果 latex 尝试使用临时文件进行编译(例如,用于字体的 mktexpk),则会失败,因为它无法在其主目录中写入。