我在 Ubuntu 14.04 上安装了 TeXLive,如下所示:
$ apt-get install -y texlive-latex-extra
现在我正在尝试编译包含以下内容的文件:
\renewcommand\sfdefault{phv}
我收到此错误:
>> kpathsea: Running mktextfm phvr7t
>> (/usr/share/texlive/texmf-dist/tex/latex/fancyhdr/fancyhdr.sty)
>> mktextfm: Running mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input phvr7t
>> This is METAFONT, Version 2.718281 (TeX Live 2013/Debian)
>>
>> kpathsea: Running mktexmf phvr7t
>>
>> ! I can't find file `phvr7t'.
>> <*> ...:=ljfour; mag:=1; nonstopmode; input phvr7t
>>
>> Please type another input file name
>> ! Emergency stop.
>> <*> ...:=ljfour; mag:=1; nonstopmode; input phvr7t
>>
>> Transcript written on mfput.log.
>> grep: phvr7t.log: No such file or directory
>> mktextfm: `mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input phvr7t' failed to make phvr7t.tfm.
>> kpathsea: Appending font creation commands to missfont.log.
>> (/usr/share/texlive/texmf-dist/tex/latex/psnfss/ot1phv.fd)
>> ! Font OT1/phv/m/n/12=phvr7t at 12.0pt not loadable: Metric (TFM) file not foun
>> d.
>> <to be read again
>>> relax
>> l.68 \normalfont
>>
>> ! ==> Fatal error occurred, no output PDF file produced!
如何解决这个问题?
答案1
您需要安装更多字体。这应该可以通过类似tlmgr install psnfss
(如果需要;我对此表示怀疑)的方法实现,更重要的是tlmgr install helvetic
。有时搞清楚字体包的命名可能很困难……