我正在尝试安装字体开放Sans进入我在 Ubuntu 中的 TexLive 2021 安装。
为此,我解压了 OpenSans 字体并在同一目录中运行以下命令:
$sudo autoinst -verbose -sans -inferiors -fractions -sanserif -math *.ttf
$sudo texhash
$sudo updmap-sys
稍后我尝试运行以下程序:
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{OpenSans}
\title{OpenSans}
\author{Me}
\begin{document}
\maketitle
Text \texttt{here} \textrm{roman} \textbf{bold} \textit{italic} \emph{emph} \textsf{SansSerif}
\end{document}
但是,当我编译我的程序 pdflatex 时,出现以下错误:
(base) daalvarez@almarhall:~/Downloads/Open_Sans$ pdflatex test2.tex
This is pdfTeX, Version 3.141592653-2.6-1.40.22 (TeX Live 2022/dev/Debian) (preloaded format=pdflatex)
restricted \write18 enabled.
entering extended mode
(./test2.tex
LaTeX2e <2021-11-15> patch level 1
L3 programming layer <2022-01-21>
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2021/10/04 v1.4n Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo))
(/usr/share/texlive/texmf-dist/tex/latex/base/fontenc.sty)
(/usr/local/share/texmf/tex/latex/OpenSans/OpenSans.sty
(/usr/share/texlive/texmf-dist/tex/latex/xkeyval/xkeyval.sty
(/usr/share/texlive/texmf-dist/tex/generic/xkeyval/xkeyval.tex
(/usr/share/texlive/texmf-dist/tex/generic/xkeyval/xkvutils.tex
(/usr/share/texlive/texmf-dist/tex/generic/xkeyval/keyval.tex))))
(/usr/share/texlive/texmf-dist/tex/latex/base/fontenc.sty)
(/usr/share/texlive/texmf-dist/tex/latex/base/textcomp.sty)
(/usr/share/texlive/texmf-dist/tex/latex/base/ifthen.sty)
(/usr/share/texlive/texmf-dist/tex/latex/fontaxes/fontaxes.sty))
(/usr/share/texlive/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def)
No file test2.aux.
(/usr/share/texlive/texmf-dist/tex/latex/base/t1cmtt.fd)
(/usr/local/share/texmf/tex/latex/OpenSans/T1OpenSans-OsF.fd) [1{/var/lib/texmf
/fonts/map/pdftex/updmap/pdftex.map}] (./test2.aux)
kpathsea: Running mktexpk --mfmode / --bdpi 600 --mag 1+0/600 --dpi 600 OpenSans-Regular-osf-t1--base
mktexpk: don't know how to create bitmap font for OpenSans-Regular-osf-t1--base.
mktexpk: perhaps OpenSans-Regular-osf-t1--base is missing from the map file.
kpathsea: Appending font creation commands to missfont.log.
)
!pdfTeX error: pdflatex (file OpenSans-Regular-osf-t1--base): Font OpenSans-Reg
ular-osf-t1--base at 600 not found
==> Fatal error occurred, no output PDF file produced!
使用 XeLaTeX 不是一个选择,因为我需要编译一本 2010 年用 LaTeX 制作的书,使用与 XeLaTeX(psfrag)不兼容的软件包,使用另一组字体。
该怎么办?