Fonts & Character SetsCannot load any fontenc except for T1

Information and discussion about fonts and character sets (e.g. how to use language specific characters)
Fibonacci
Posts: 37
Joined: Tue Jan 25, 2011 1:16 am

Cannot load any fontenc except for T1

Post by Fibonacci »

Hello.

I'm using vanilla TeX Live on an Ubuntu OS, installed in May this year following the instructions at http://www.tug.org/texlive/debian.html#vanilla

I've recently noticed that I cannot load any font encoding except for T1. So, for example, the following code

Code: Select all

\documentclass{minimal}
\usepackage[T2A]{fontenc}
\begin{document}
\end{document}
fails with the following error messages:
This is pdfTeX, Version 3.14159265-2.6-1.40.15 (TeX Live 2014) (preloaded format=latex)
restricted \write18 enabled.
entering extended mode
(./file.tex
LaTeX2e <2014/05/01>
Babel <3.9k> and hyphenation patterns for 78 languages loaded.
(/usr/local/texlive/2014/texmf-dist/tex/latex/base/minimal.cls
Document Class: minimal 2001/05/25 Standard LaTeX minimal class
) (/usr/local/texlive/2014/texmf-dist/tex/latex/lm/lmodern.sty)
(/usr/local/texlive/2014/texmf-dist/tex/latex/base/fontenc.sty
(/usr/local/texlive/2014/texmf-dist/tex/latex/cyrillic/t2aenc.def)
(/usr/local/texlive/2014/texmf-dist/tex/latex/cyrillic/t2acmr.fd)
kpathsea: Running mktextfm larm1000
mktextfm: Cannot find mktex.opt; check your installation.
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.100 \fontencoding\encodingdefault\selectfont

? q
OK, entering batchmode
The same happens if I change T2A for T2B, T2C, X2, and so on. However, T1 works just fine, and (expectedly) generates no output file.

What am I doing wrong?

Thanks in advance.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Cannot load any fontenc except for T1

Post by Johannes_B »

Your example loads the minimal class, thoug it sounds like it, it isn't a class to be used for minimal examples (article is). But more importantly, the message you have shown was issued on line 100.
There is absolutely no way for me to shed any light on this without further information (usually found in a minimal working example). You are changing fonts somewhere, there might be the culprit.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Fibonacci
Posts: 37
Joined: Tue Jan 25, 2011 1:16 am

Cannot load any fontenc except for T1

Post by Fibonacci »

Well, this code produces exactly the same error and it is “the smallest possible complete document that illustrates a problem”:

Code: Select all

\documentclass{article}
\usepackage[T2A]{fontenc}
\begin{document}
\end{document}
Fibonacci
Posts: 37
Joined: Tue Jan 25, 2011 1:16 am

Cannot load any fontenc except for T1

Post by Fibonacci »

I've also found that this code

Code: Select all

\documentclass{article}
\usepackage[T2A]{fontenc}
\begin{document}
Additional line.
\end{document}
produces the exact same error on line 100 (instead of 101). Therefore the error must be occurring somewhere that is being loaded before my actual document, not after, such as fontenc.sty. Indeed, as you can see here (and I could check on my install), the code \fontencoding\encodingdefault\selectfont is precisely line 100 of fontenc.sty.

I'm not changing fonts anywhere or doing anything other than what I've shown, but I'm still getting those error messages.
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Re: Cannot load any fontenc except for T1

Post by Johannes_B »

Can you show us the complete log file of the just posted example?

Also, please reinstall package cm-super using the TeX Live Manager (tlmgr).
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Fibonacci
Posts: 37
Joined: Tue Jan 25, 2011 1:16 am

Cannot load any fontenc except for T1

Post by Fibonacci »

Johannes_B wrote:Can you show us the complete log file of the just posted example?
Here:
This is pdfTeX, Version 3.14159265-2.6-1.40.15 (TeX Live 2014) (preloaded format=pdflatex 2014.11.6) 7 NOV 2014 17:19
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
**file.tex
(./file.tex
LaTeX2e <2014/05/01>
Babel <3.9l> and hyphenation patterns for 79 languages loaded.

(/usr/local/texlive/2014/texmf-dis
t/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class

(/usr/local/texlive/2014/texmf-dis
t/tex/latex/base/size10.clo
File: size10.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
)
\c@part=\count79
\c@section=\count80
\c@subsection=\count81
\c@subsubsection=\count82
\c@paragraph=\count83
\c@subparagraph=\count84
\c@figure=\count85
\c@table=\count86
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
(/usr/local/texlive/2014/texmf-dis
t/tex/latex/base/fontenc.sty
Package: fontenc 2005/09/27 v1.99g Standard LaTeX package

(/usr/local/texlive/2014/texmf-dis
t/tex/latex/cyrillic/t2aenc.def
File: t2aenc.def 2005/09/27 v1.0i Cyrillic encoding definition file
)
LaTeX Font Info: Try loading font information for T2A+cmr on input line 100.


(/usr/local/texlive/2014/texmf-dis
t/tex/latex/cyrillic/t2acmr.fd
File: t2acmr.fd 2001/08/11 v1.0a Computer Modern Cyrillic font definitions
)
! Font T2A/cmr/m/n/10=larm1000 at 10.0pt not loadable: Metric (TFM) file not fo
und.
<to be read again>
relax
l.100 \fontencoding\encodingdefault\selectfont

? q
OK, entering batchmode...
) (./file.aux)
\openout1 = `file.aux'.

LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 3.
LaTeX Font Info: ... okay on input line 3.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 3.
LaTeX Font Info: ... okay on input line 3.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 3.
LaTeX Font Info: ... okay on input line 3.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 3.
LaTeX Font Info: ... okay on input line 3.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 3.
LaTeX Font Info: ... okay on input line 3.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 3.
LaTeX Font Info: ... okay on input line 3.
LaTeX Font Info: Checking defaults for T2A/cmr/m/n on input line 3.
LaTeX Font Info: ... okay on input line 3.
(./file.aux) )
Here is how much of TeX's memory you used:
642 strings out of 493109
7470 string characters out of 6114844
53829 words of memory out of 5000000
4184 multiletter control sequences out of 15000+600000
3640 words of font info for 14 fonts, out of 8000000 for 9000
1141 hyphenation exceptions out of 8191
23i,1n,20p,184b,72s stack positions out of 5000i,500n,10000p,200000b,80000s

No pages of output.
PDF statistics:
0 PDF objects out of 1000 (max. 8388607)
0 named destinations out of 1000 (max. 500000)
1 words of extra memory for PDF output out of 10000 (max. 10000000)
Just in case, missfont.log (which isn't mentioned in this log file—only in the console output) consists of the following line repeated three times:

mktextfm larm1000
Johannes_B wrote:Also, please reinstall package cm-super using the TeX Live Manager (tlmgr).
That did it, thank you.

However, this problem still appears on a fresh (as of yesterday) installation of TeXLive in GNU/Linux, not so on Windows.
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Re: Cannot load any fontenc except for T1

Post by Johannes_B »

Computer modern fonts are available for encoding OT1 (Knuth's original encoding), all others are provided by cm-super (computerModern super).
Though i have to confess that i thought it would be installed with a vanilla TeX Live.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Fibonacci
Posts: 37
Joined: Tue Jan 25, 2011 1:16 am

Cannot load any fontenc except for T1

Post by Fibonacci »

That seemed strange to me, since cm-super was indeed included in vanilla TeXLive (I had to force-remove it in order to reinstall it and get that to work).

So I tried reinstalling cm-super in another (fresh) Linux install of TeX Live, and guess what? It's not working.

I'm getting the same error messages once again with exactly the same log files as before. I've got no idea of why reinstalling worked the previous time.
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Re: Cannot load any fontenc except for T1

Post by Johannes_B »

Are you sure the install was successful and all the files have been copied to the right place?
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Fibonacci
Posts: 37
Joined: Tue Jan 25, 2011 1:16 am

Re: Cannot load any fontenc except for T1

Post by Fibonacci »

Yes, I'm sure. I got no errors during the installation. But just in case, is there any way I can check?
Post Reply