我正在尝试通过将以下内容放入我的文档的序言中来使用副字体:
\RequirePackage{paratype}
\renewcommand*\familydefault{\sfdefault}
\RequirePackage[T1]{fontenc}
这在我的工作机器上运行良好,但在我的个人机器上,当我尝试编译我的文档时,出现以下错误消息:
kpathsea: Running mktexpk --mfmode / --bdpi 600 --mag 1+340/600 --dpi 940 PTSans-Italic-tlf-t1--base
mktexpk: don't know how to create bitmap font for PTSans-Italic-tlf-t1--base.
mktexpk: perhaps PTSans-Italic-tlf-t1--base is missing from the map file.
kpathsea: Appending font creation commands to missfont.log.
我曾尝试用以下方法修复此问题(我意识到使用而不是updmap
有缺点;但这不是我目前关心的):updmap-user
updmap-sys
sudo updmap-user --force --enable Map=paratype-truetype.map
以下是上述命令的输出:
updmap [WARNING]: resetting $HOME value (was /home/username) to root's actual home (/root).
updmap will read the following updmap.cfg files (in precedence order):
/root/.texlive2017/texmf-config/web2c/updmap.cfg
/etc/texmf/web2c/updmap.cfg
/usr/share/texmf/web2c/updmap.cfg
/usr/share/texlive/texmf-dist/web2c/updmap.cfg
updmap may write changes to the following updmap.cfg file:
/root/.texlive2017/texmf-config/web2c/updmap.cfg
dvips output dir: "/root/.texlive2017/texmf-var/fonts/map/dvips/updmap"
pdftex output dir: "/root/.texlive2017/texmf-var/fonts/map/pdftex/updmap"
dvipdfmx output dir: "/root/.texlive2017/texmf-var/fonts/map/dvipdfmx/updmap"
updmap [WARNING]: font PTSans-Narrow-tlf-t1--base is defined multiple times:
updmap [WARNING]: paratype-type1.map (from /usr/share/texlive/texmf-dist/web2c/updmap.cfg)
updmap [WARNING]: paratype-truetype.map (from /etc/texmf/web2c/updmap.cfg) (used)
... (ommitting many similar warnings) ...
updmap is creating new map files
using the following configuration:
LW35 font names : URWkb (default)
prefer outlines : true (default)
texhash enabled : true
download standard fonts (dvips) : true (default)
download standard fonts (pdftex) : true (default)
jaEmbed replacement string : noEmbed (default)
jaVariant replacement string : <empty> (default)
scEmbed replacement string : noEmbed (default)
tcEmbed replacement string : noEmbed (default)
koEmbed replacement string : noEmbed (default)
create a mapfile for pxdvi : false (default)
Scanning for LW35 support files [ 3 files]
Scanning for MixedMap entries [ 50 files]
Scanning for KanjiMap entries [ 11 files]
Scanning for Map entries [265 files]
Generating output for dvipdfmx...
Generating output for ps2pk...
Generating output for dvips...
Generating output for pdftex...
Files generated:
/root/.texlive2017/texmf-var/fonts/map/dvips/updmap:
15786 2018-10-11 14:15:12 builtin35.map
21259 2018-10-11 14:15:12 download35.map
2445741 2018-10-11 14:15:12 psfonts_pk.map
2706850 2018-10-11 14:15:12 psfonts_t1.map
2700806 2018-10-11 14:15:12 ps2pk.map
14 2018-10-11 14:15:14 psfonts.map -> psfonts_t1.map
/root/.texlive2017/texmf-var/fonts/map/pdftex/updmap:
2700813 2018-10-11 14:15:14 pdftex_dl14.map
2699148 2018-10-11 14:15:13 pdftex_ndl14.map
15 2018-10-11 14:15:14 pdftex.map -> pdftex_dl14.map
/root/.texlive2017/texmf-var/fonts/map/dvipdfmx/updmap:
6706 2018-10-11 14:15:12 kanjix.map
Transcript written on "/root/.texlive2017/texmf-var/web2c/updmap.log".
updmap: Updating ls-R files.
但是,当我在文件资源管理器中查看生成的文件时,它们似乎尚未更新;上面的日期是 2018 年 9 月 27 日。我不知所措;我看过的许多其他答案都建议运行updmap
应该可以解决这个问题。
我会注意到,添加\pdfmapfile{+paratype-truetype.map}
到我的文档的序言中可以解决问题,但这不是一个好的永久解决方案。
我正在运行 Xubuntu 18.04、TexLive 2017。
答案1
我从 Ulrike Fischer 的评论中得到的解决方案是运行
updmap-user --force --enable Map=paratype-truetype.map
我不知道为什么包含 sudo 会有所不同。如果有人可以提供任何见解,我会非常有兴趣学习!