我尝试安装 LaTeX 包garamondx
并编译软件包附带的文档。为此,我garamondx.tds.zip
从http://www.ctan.org/tex-archive/install/fonts,将档案提取到$HOME/texmf
并运行texhash
。updmap
对我的本地用户不起作用,因为
Directory "/var/lib/texmf/fonts/map/dvips/updmap" isn't writable
不幸的是,它不起作用。当我尝试运行提供的最小示例时,我收到返回错误代码 70:
kpathsea: Running mktexpk --mfmode / --bdpi 600 --mag 1+0/600 --dpi 600 zgmr8r
mktexpk: don't know how to create bitmap font for zgmr8r.
mktexpk: perhaps zgmr8r is missing from the map file.
kpathsea: Appending font creation commands to missfont.log.
)
!pdfTeX error: /usr/bin/pdflatex (file zgmr8r): Font zgmr8r at 600 not found
==> Fatal error occurred, no output PDF file produced!
最小示例:
\documentclass{article}
\usepackage{garamondx}
\begin{document}
Hello world!
\end{document}
我正在使用 texlive2012。
答案1
如果你已经安装了可用的 TeX Live 环境(使用列出的方法之一这里)你应该安装非自由字体(如garamondx)这指导。
简而言之,首先下载脚本并使用 执行它(需要 root 权限)texlua install-getnonfreefonts
。你会看到类似这样的内容
Detected System: x86_64-linux
Detected Installation: /usr/local/texlive/2012
mkdir /usr/local/texlive/2012/texmf/scripts/getnonfreefonts ... [done]
Installing texmf/scripts/getnonfreefonts/getnonfreefonts.pl ... [done]
Installing texmf/doc/man/man1/getnonfreefonts.1 ... [done]
Installing texmf/doc/man/man1/getnonfreefonts-sys.1 ... [done]
Installing texmf/doc/man/man1/getnonfreefonts.man1.pdf ... [done]
Installing texmf/doc/man/man1/getnonfreefonts-sys.man1.pdf ... [done]
md5sum: cf8aeec0477a28c0c32ba1166f8bd8f3 getnonfreefonts.pl ... [ok]
md5sum: f850d910dd96ee27cecdb3772047d247 getnonfreefonts.1 ... [ok]
md5sum: fb2b0f7699db8e627d4e26b730e94928 getnonfreefonts-sys.1 ... [ok]
md5sum: 415b51f7c80a4abe8d0a667a04c9d525 getnonfreefonts.man1.pdf ... [ok]
Fixing File Permissions ... [done]
Creating symlinks in 'bin/x86_64-linux' ... [done]
texhash: Updating /usr/local/texlive/2012/texmf/ls-R...
texhash: Done.
然后运行getnonfreefonts -l
获取可用字体的列表:
arial-urw Arial (URW) [not installed]
classico Classico (URW) [not installed]
dayroman DayRoman (Apostrophiclabs) [not installed]
eurofont Euro symbols (Adobe) [not installed]
garamond GaramondNo8 (URW) [not installed]
garamondx GaramondNo8 Expert (Michael Sharpe) [not installed]
lettergothic LetterGothic (URW) [not installed]
luximono LuxiMono (Bigelow & Holmes) [not installed]
vntex-nonfree VnTeX nonfree (Han The Thanh) [not installed]
webomints Webomints (Galapagos Design Group) [not installed]
最后getnonfreefonts garamondx
(getnonfreefonts -a
安装所有非自由字体)。
答案2
对于 Windows 用户,您可以按照以下步骤操作(假设已安装 textlive):
- 使用命令提示符运行:
curl --remote-name https://www.tug.org/fonts/getnonfreefonts/install-getnonfreefonts
2.然后texlua install-getnonfreefonts --sys
- 检查已安装的字体
getnonfreefonts --sys -l
- 安装所有字体
getnonfreefonts --sys -a
您可以在-a后添加名称,但我还没有测试安装特定的字体。
答案3
我遇到了同样的问题,并getnonfreefonts.pl
通过运行安装的脚本解决了该问题install-getnonfreefonts
使用选项--sys --refreshmap --all
。这可以正确更新字体映射。