这是我的文件:
\documentclass{article}
\usepackage[T2A,T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[russian,english]{babel}
\begin{document}
Hello, \foreignlanguage{russian}{друг}!
\end{document}
这就是我得到的:
kpathsea: Running mktextfm larm1000
/usr/local/texlive/2021/texmf-dist/web2c/mktexnam: Could not map source abbreviation for larm1000.
/usr/local/texlive/2021/texmf-dist/web2c/mktexnam: Need to update ?
mktextfm: Running mf-nowin -progname=mf \mode:=ljfour; mag:=1; ; nonstopmode; input larm1000
This is METAFONT, Version 2.71828182 (TeX Live 2021) (preloaded base=mf)
kpathsea: Running mktexmf larm1000
! I can't find file `larm1000'.
<*> ...four; mag:=1; ; nonstopmode; input larm1000
Please type another input file name
! Emergency stop.
<*> ...four; mag:=1; ; nonstopmode; input larm1000
Transcript written on mfput.log.
grep: larm1000.log: No such file or directory
mktextfm: `mf-nowin -progname=mf \mode:=ljfour; mag:=1; ; nonstopmode; input larm1000' failed to make larm1000.tfm.
kpathsea: Appending font creation commands to missfont.log.
! Font T2A/cmr/m/n/10=larm1000 at 10.0pt not loadable: Metric (TFM) file not fo
und.
<to be read again>
relax
l.6 Hello, \foreignlanguage{russian}{друг}
!
?
可能出了什么问题?我在使用 TeX Live 2021 的 Ubuntu 20.04:
$ pdflatex --version
pdfTeX 3.141592653-2.6-1.40.23 (TeX Live 2021)
kpathsea version 6.3.3
Copyright 2021 Han The Thanh (pdfTeX) et al.
There is NO warranty. Redistribution of this software is
covered by the terms of both the pdfTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the pdfTeX source.
Primary author of pdfTeX: Han The Thanh (pdfTeX) et al.
Compiled with libpng 1.6.37; using libpng 1.6.37
Compiled with zlib 1.2.11; using zlib 1.2.11
Compiled with xpdf version 4.03
顺便说一句,我试图找到这个文件,但它不在那里:tlmgr search --file larm1000.tfm --global
答案1
tfm
家庭文件是lh
按需生成的。这就是为什么你看到
kpathsea: Running mktextfm larm1000
我怎么知道字体系列的名称?恐怕这是常识。
您可能会这样做tlmgr install lh
,但您还需要cm-super
Type1 字体的 TeX Live 包。
从你的名字来看,我猜你会经常使用西里尔字母,所以最好安装整个langcyrillic
系列。如果我这样做
tlmgr info collection-langcyrillic --list
我明白了
package: collection-langcyrillic
category: Collection
shortdesc: Cyrillic
longdesc: Support for Cyrillic scripts (Bulgarian, Russian, Serbian, Ukrainian), even if Latin alphabets may also be used.
installed: Yes
revision: 54074
sizes: 50553k
relocatable: No
depends:
babel-belarusian
babel-bulgarian
babel-russian
babel-serbian
babel-serbianc
babel-ukrainian
churchslavonic
cmcyr
collection-basic
collection-latex
cyrillic
cyrillic-bin
cyrplain
disser
eskd
eskdx
gost
hyphen-belarusian
hyphen-bulgarian
hyphen-churchslavonic
hyphen-mongolian
hyphen-russian
hyphen-serbian
hyphen-ukrainian
lcyw
lh
lhcyr
lshort-bulgarian
lshort-mongol
lshort-russian
lshort-ukr
mongolian-babel
montex
mpman-ru
numnameru
pst-eucl-translation-bg
ruhyphen
russ
serbian-apostrophe
serbian-date-lat
serbian-def-cyr
serbian-lig
t2
texlive-ru
texlive-sr
ukrhyph
xecyrmongolian
Included files, by type:
您可能不需要其中一些 TeX Live 包,但是……