我在 Cygwin/TeX Live 下设置字体时遇到了一些问题,任何关于如何解决这个问题的想法都值得欢迎。
我在 PC 上安装了新的 Cygwin 1.7.x,它自带 TeX Live,我尝试安装一个名为“Interstate”的附加字体。该字体以文件形式提供tar.gz
,因此我像下面这样解压了该文件并获得了该文件/文件夹结构。
$ tar -zxvf Interstate-fonts4-texlive.tar.gz
usr/share/
usr/share/texmf/
usr/share/texmf/fonts/
usr/share/texmf/fonts/enc/
usr/share/texmf/fonts/enc/dvips/
usr/share/texmf/fonts/enc/dvips/lcdftools/
usr/share/texmf/fonts/enc/dvips/lcdftools/a_2fwcon.enc
usr/share/texmf/fonts/enc/dvips/lcdftools/a_2mvdqo.enc
usr/share/texmf/fonts/enc/dvips/lcdftools/a_c353pt.enc
usr/share/texmf/fonts/enc/dvips/lcdftools/a_e7miqr.enc
usr/share/texmf/fonts/enc/dvips/lcdftools/a_phwclb.enc
usr/share/texmf/fonts/enc/dvips/lcdftools/a_xdkkoc.enc
usr/share/texmf/fonts/map/
usr/share/texmf/fonts/map/lcdftools/
usr/share/texmf/fonts/map/lcdftools/Interstate/
usr/share/texmf/fonts/map/lcdftools/Interstate/Interstate.map
usr/share/texmf/fonts/map/lcdftools/InterstateLight/
usr/share/texmf/fonts/map/lcdftools/InterstateLight/InterstateLight.map
usr/share/texmf/fonts/tfm/
usr/share/texmf/fonts/tfm/lcdftools/
usr/share/texmf/fonts/tfm/lcdftools/Interstate/
usr/share/texmf/fonts/tfm/lcdftools/Interstate/Interstate-Bold-tlf-ly1--base.tfm
usr/share/texmf/fonts/tfm/lcdftools/Interstate/Interstate-Bold-tlf-ly1--lcdfj.tfm
usr/share/texmf/fonts/tfm/lcdftools/Interstate/Interstate-Bold-tlf-ly1.tfm
usr/share/texmf/fonts/tfm/lcdftools/Interstate/Interstate-Bold-tlf-t1--base.tfm
usr/share/texmf/fonts/tfm/lcdftools/Interstate/Interstate-Bold-tlf-t1--lcdfj.tfm
usr/share/texmf/fonts/tfm/lcdftools/Interstate/Interstate-Bold-tlf-t1.tfm
usr/share/texmf/fonts/tfm/lcdftools/Interstate/Interstate-Bold-tlf-ts1--base.tfm
usr/share/texmf/fonts/tfm/lcdftools/Interstate/Interstate-Bold-tlf-ts1.tfm
usr/share/texmf/fonts/tfm/lcdftools/InterstateLight/
usr/share/texmf/fonts/tfm/lcdftools/InterstateLight/Interstate-Light-Italic-tlf-ly1--base.tfm
usr/share/texmf/fonts/tfm/lcdftools/InterstateLight/Interstate-Light-Italic-tlf-ly1--lcdfj.tfm
usr/share/texmf/fonts/tfm/lcdftools/InterstateLight/Interstate-Light-Italic-tlf-ly1.tfm
usr/share/texmf/fonts/tfm/lcdftools/InterstateLight/Interstate-Light-Italic-tlf-t1--base.tfm
usr/share/texmf/fonts/tfm/lcdftools/InterstateLight/Interstate-Light-Italic-tlf-t1--lcdfj.tfm
usr/share/texmf/fonts/tfm/lcdftools/InterstateLight/Interstate-Light-Italic-tlf-t1.tfm
usr/share/texmf/fonts/tfm/lcdftools/InterstateLight/Interstate-Light-Italic-tlf-ts1--base.tfm
usr/share/texmf/fonts/tfm/lcdftools/InterstateLight/Interstate-Light-Italic-tlf-ts1.tfm
usr/share/texmf/fonts/tfm/lcdftools/InterstateLight/Interstate-Light-tlf-ly1--base.tfm
usr/share/texmf/fonts/tfm/lcdftools/InterstateLight/Interstate-Light-tlf-ly1--lcdfj.tfm
usr/share/texmf/fonts/tfm/lcdftools/InterstateLight/Interstate-Light-tlf-ly1.tfm
usr/share/texmf/fonts/tfm/lcdftools/InterstateLight/Interstate-Light-tlf-t1--base.tfm
usr/share/texmf/fonts/tfm/lcdftools/InterstateLight/Interstate-Light-tlf-t1--lcdfj.tfm
usr/share/texmf/fonts/tfm/lcdftools/InterstateLight/Interstate-Light-tlf-t1.tfm
usr/share/texmf/fonts/tfm/lcdftools/InterstateLight/Interstate-Light-tlf-ts1--base.tfm
usr/share/texmf/fonts/tfm/lcdftools/InterstateLight/Interstate-Light-tlf-ts1.tfm
usr/share/texmf/fonts/type1/
usr/share/texmf/fonts/type1/lcdftools/
usr/share/texmf/fonts/type1/lcdftools/Interstate/
usr/share/texmf/fonts/type1/lcdftools/Interstate/Interstate-Bold.pfb
usr/share/texmf/fonts/type1/lcdftools/Interstate/Interstate-BoldLCDFJ.pfb
usr/share/texmf/fonts/type1/lcdftools/InterstateLight/
usr/share/texmf/fonts/type1/lcdftools/InterstateLight/Interstate-Light-Italic.pfb
usr/share/texmf/fonts/type1/lcdftools/InterstateLight/Interstate-Light-ItalicLCDFJ.pfb
usr/share/texmf/fonts/type1/lcdftools/InterstateLight/Interstate-Light.pfb
usr/share/texmf/fonts/type1/lcdftools/InterstateLight/Interstate-LightLCDFJ.pfb
usr/share/texmf/fonts/vf/
usr/share/texmf/fonts/vf/lcdftools/
usr/share/texmf/fonts/vf/lcdftools/Interstate/
usr/share/texmf/fonts/vf/lcdftools/Interstate/Interstate-Bold-tlf-ly1.vf
usr/share/texmf/fonts/vf/lcdftools/Interstate/Interstate-Bold-tlf-t1.vf
usr/share/texmf/fonts/vf/lcdftools/Interstate/Interstate-Bold-tlf-ts1.vf
usr/share/texmf/fonts/vf/lcdftools/InterstateLight/
usr/share/texmf/fonts/vf/lcdftools/InterstateLight/Interstate-Light-Italic-tlf-ly1.vf
usr/share/texmf/fonts/vf/lcdftools/InterstateLight/Interstate-Light-Italic-tlf-t1.vf
usr/share/texmf/fonts/vf/lcdftools/InterstateLight/Interstate-Light-Italic-tlf-ts1.vf
usr/share/texmf/fonts/vf/lcdftools/InterstateLight/Interstate-Light-tlf-ly1.vf
usr/share/texmf/fonts/vf/lcdftools/InterstateLight/Interstate-Light-tlf-t1.vf
usr/share/texmf/fonts/vf/lcdftools/InterstateLight/Interstate-Light-tlf-ts1.vf
usr/share/texmf/tex/
usr/share/texmf/tex/latex/
usr/share/texmf/tex/latex/lcdftools/
usr/share/texmf/tex/latex/lcdftools/InterstateLight/
usr/share/texmf/tex/latex/lcdftools/InterstateLight/Interstate.sty
usr/share/texmf/tex/latex/lcdftools/InterstateLight/LY1Interstate-TLF.fd
usr/share/texmf/tex/latex/lcdftools/InterstateLight/T1Interstate-TLF.fd
usr/share/texmf/tex/latex/lcdftools/InterstateLight/TS1Interstate-TLF.fd
为了完成字体设置,我编写了一个小脚本来运行下面的命令,但它返回一条错误消息:
mktexlsr: Updating /etc/texmf/ls-R...
mktexlsr: Updating /usr/share/texmf-dist/ls-R...
mktexlsr: Updating /usr/share/texmf-site/ls-R...
mktexlsr: Updating /var/lib/texmf/ls-R...
mktexlsr: Done.
updmap is using the following updmap.cfg files (in precedence order):
/etc/texmf/web2c/updmap.cfg
updmap is using the following updmap.cfg file for writing changes:
/home/abuisson/.config/texmf/web2c/updmap.cfg
Creating new config file /home/abuisson/.config/texmf/web2c/updmap.cfg
dvips output dir: "/home/abuisson/.cache/texmf/fonts/map/dvips/updmap"
pdftex output dir: "/home/abuisson/.cache/texmf/fonts/map/pdftex/updmap"
dvipdfmx output dir: "/home/abuisson/.cache/texmf/fonts/map/dvipdfmx/updmap"
pxdvi output dir: "/home/abuisson/.cache/texmf/fonts/map/pxdvi/updmap"
ERROR: The following map file(s) couldn't be found:
Interstate.map (in /home/abuisson/.config/texmf/web2c/updmap.cfg)
Did you run mktexlsr?
You can disable non-existent map entries using the option
--syncwithtrees.
下面是我运行的用于获取错误消息的命令。
# create texmf-site if non-existent
if [ ! -d /usr/share/texmf-site ];
then
mkdir /usr/share/texmf-site
fi
# update paths, including the new fonts
mktexlsr
# font installation
updmap --enable Map Interstate.map
updmap --enable Map InterstateLight.map
答案1
我找到了至少一个“解决方法”。当 .tar.gz 文件在 中展开其文件夹和文件结构时/usr/share/texmf/
,我意识到 TexLive updmap 和 kpath 在 中搜索 map、sty 等的路径,/usr/share/textmf-site/
因为这是我运行时获得的路径:
kpsewhich --var-value=TEXMFLOCAL
因此,最简单的解决方案是使用以下命令将整个texmf
文件夹内容复制(复制)到texmf-site
文件夹中:
cp -r /usr/share/texmf/* /usr/share/texmf-site/
并再次调用我的字体安装脚本。