我知道这个论坛上存在类似的主题。但是任何回复都可以解决我的问题。
我正在使用 Ubuntu 10.4,在我决定使用 XeLaTeX 而不是 LaTeX 之前,我的字体没有问题(参见https://tex.stackexchange.com/questions/12347/typesetting-a-document-using-arabic -脚本/12358#12358)。问题是我无法使用 XeLaTeX 编译任何 .tex 文档,也无法正确显示 XeLaTeX 文档。正如我通过提到的线程了解到的那样,XeLaTeX 通常使用系统中的可用字体。
我正在尝试阅读fontspec
文档,但它以 pdf 格式打开,有很多空白,终端输出(很长)主要包含错误。这只是其中的几行:
Error: Missing language pack for 'Adobe-Japan1' mapping
Error: Unknown font tag 'F5.1'
Error (24124): No font in show
Error: Unknown font tag 'F5.1'
我试图编译简单的 XeLaTeX 文件:
\documentclass{article}
\usepackage{fontspec}
\setmainfont{Linux Libertine O}
\begin{document}
Hello World!
\end{document}
没有成功。这是编译的终端输出:
This is XeTeX, Version 3.1415926-2.2-0.9995.2 (TeX Live 2009/Debian)
restricted \write18 enabled.
entering extended mode
(./ex.tex
LaTeX2e <2009/09/24>
Babel <v3.8l> and hyphenation patterns for english, usenglishmax, dumylang, noh
yphenation, polish, loaded.
(/usr/share/texmf-texlive/tex/latex/base/article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(/usr/share/texmf-texlive/tex/latex/base/size10.clo))
(/usr/share/texmf-texlive/tex/xelatex/fontspec/fontspec.sty
(/usr/share/texmf-texlive/tex/generic/ifxetex/ifxetex.sty)
(/usr/share/texmf-texlive/tex/latex/tools/calc.sty)
(/usr/share/texmf-texlive/tex/latex/xkeyval/xkeyval.sty
(/usr/share/texmf-texlive/tex/generic/xkeyval/xkeyval.tex
(/usr/share/texmf-texlive/tex/generic/xkeyval/keyval.tex)))
(/usr/share/texmf-texlive/tex/latex/base/fontenc.sty
(/usr/share/texmf-texlive/tex/xelatex/euenc/eu1enc.def)
(/usr/share/texmf-texlive/tex/xelatex/euenc/eu1lmr.fd))
fontspec.cfg loaded.
(/usr/share/texmf-texlive/tex/xelatex/fontspec/fontspec.cfg))kpathsea: Invalid fontname `Linux Libertine O', contains ' '
! Font \zf@basefont="Linux Libertine O" at 10.0pt not loadable: Metric (TFM) fi
le or installed font not found.
\zf@fontspec ...ntname \zf@suffix " at \f@size pt
\unless \ifzf@icu \zf@set@...
l.3 \setmainfont{Linux Libertine O}
?
我找不到Linux Libertine O
。搜索结果otf-
:aptitude
maria@maria-laptop:/etc/fonts$ aptitude search otf
p emdebian-rootfs - emdebian root filesystem support
p libotf-bin - A Library for handling OpenType Font - utilities
p libotf-dev - A Library for handling OpenType Font - development
i libotf0 - A Library for handling OpenType Font - runtime
p libotf0-dbg - The libotf libraries and debugging symbols
p libpam-dotfile - A PAM module which allows users to have more than one password
p livecd-rootfs - construction script for the livecd rootfs
p makebootfat - Utility to create a bootable FAT filesystem
p otf-ipaexfont - Japanese OpenType font, IPAexFont (IPAexGothic/Mincho)
p otf-ipaexfont-gothic - Japanese OpenType font, IPAexFont (IPAexGothic)
p otf-ipaexfont-mincho - Japanese OpenType font, IPAexFont (IPAexMincho)
p otf-ipafont - Japanese OpenType font set, IPAfont
p otf-ipafont-gothic - Japanese OpenType font set, IPA Gothic font
p otf-ipafont-mincho - Japanese OpenType font set, IPA Mincho font
p otf-stix - the Scientific and Technical Information eXchange fonts
p otf-thai-tlwg - Thai fonts in OpenType format
p otf-yozvox-yozfont - Japanese proportional Handwriting OpenType font
p otf2bdf - generate BDF bitmap fonts from OpenType outline fonts
p robotfindskitten - Zen Simulation of robot finding kitten
因此,如果我没记错的话,有问题的字体不仅被卸载,而且不可用。这是否意味着我缺少一些存储库?
我也试图从线程中应用解决方案如何重新安装默认字体?,但结果是:
maria@maria-laptop:~$ sudo apt-get install msttcorefonts
[sudo] password for maria:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting ttf-mscorefonts-installer instead of msttcorefonts
ttf-mscorefonts-installer is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
maria@maria-laptop:~$
这似乎不是使用 XeLaTeX 的常见问题;提到的线程中没有人建议安装 TeX Live 以外的任何东西。
提前致谢
最后我设法解决了这个问题。
缺少字体可以通过 Ubuntu 软件中心访问(我之前认为这只是
apt
与 Synaptic 相同机制的另一个图形表示......)通过安装
poppler-data
.希望它对有类似问题的人有所帮助。