10

According to this question pdftex-error-font-expansion-auto-expansion-is-only-possible-with-scalable

To get rid of the error above, is to load a scalable font like lmodern

\usepackage[T1]{fontenc}
\usepackage{lmodern}

And it does.

But here is my question: This MWE compiles OK on TL 2015 without \usepackage{lmodern} loaded! but gives an error with MikTeX 2.9 on windows. Same Latex file. Not only that, if I removed microtype package and not load lmodern, then MikTeX will now compile it without the error.

\documentclass[12pt]{report}%  
\usepackage[T1]{fontenc}
%\usepackage{lmodern}  %This is only needed for MikTeX, why??
\usepackage[tracking]{microtype}
\usepackage{lipsum}  % to generate filler text    
\begin{document}   
\lipsum[2-4]
\chapter{Introduction} 
\end{document}

The above compiled OK with TL 2015, but gives error with MikTeX:

This is pdfTeX, Version 3.1415926-2.5-1.40.14 (MiKTeX 2.9 64-bit)
pdflatex index.tex

(C:\Users\me\AppData\Roaming\MiKTeX\2.9\tex\latex\microtype\mt-cmr.cfg)
[1{C:/Users/me/AppData/Local/MiKTeX/2.9/pdftex/config/pdftex.map}
! pdfTeX error (font expansion): auto expansion is only possible with scalable
fonts.
<to be read again>
                   \endgroup \set@typeset@protect
l.9 \chapter
            {Introduction}
!  ==> Fatal error occurred, no output PDF file produced!
Transcript written on index.log.

Now on Linux:

pdflatex index.tex
This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015) (preloaded format=pdflatex)

No error. Clean compile. Now, removing the \usepackage[tracking]{microtype} then MiKTeX will now compile it ok:

\documentclass[12pt]{report}%  
\usepackage[T1]{fontenc}
\usepackage{lipsum}  % to generate filler text    
\begin{document}   
\lipsum[2-4]
\chapter{Introduction} 
\end{document}

So loading lmodern is not needed if one also do not load microtype and is running MikTex. But if using TL instead of MikTex, then one can load microtype and not load lmodern and it will work.

Here is the file list on MiKTex:

 *File List*
  report.cls    2007/10/19 v1.4h Standard LaTeX document class
  size12.clo    2007/10/19 v1.4h Standard LaTeX file (size option)
 fontenc.sty
   t1enc.def    2005/09/27 v1.99g Standard LaTeX file
 lmodern.sty    2009/10/30 v1.6 Latin Modern Fonts
microtype.sty    2013/05/23 v2.5a Micro-typographical refinements (RS)
  keyval.sty    1999/03/16 v1.13 key=value parser (DPC)
microtype-pdftex.def    2013/05/23 v2.5a Definitions specific to pdftex (RS)
microtype.cfg    2013/05/23 v2.5a microtype main configuration file (RS)
  lipsum.sty    2014/07/27 v1.3 150 paragraphs of Lorem Ipsum dummy text
   t1lmr.fd    2009/10/30 v1.6 Font defs for Latin Modern
  mt-cmr.cfg    2013/05/19 v2.2 microtype config. file: Computer Modern Roman (
RS)
 ***********

Here is the file list on TL 2015:

  report.cls    2014/09/29 v1.4h Standard LaTeX document class
  size12.clo    2014/09/29 v1.4h Standard LaTeX file (size option)
 fontenc.sty
   t1enc.def    2005/09/27 v1.99g Standard LaTeX file
 lmodern.sty    2009/10/30 v1.6 Latin Modern Fonts
microtype.sty    2013/05/23 v2.5a Micro-typographical refinements (RS)
  keyval.sty    2014/10/28 v1.15 key=value parser (DPC)
microtype-pdftex.def    2013/05/23 v2.5a Definitions specific to pdftex (RS)
microtype.cfg    2013/05/23 v2.5a microtype main configuration file (RS)
  lipsum.sty    2014/07/27 v1.3 150 paragraphs of Lorem Ipsum dummy text
   t1lmr.fd    2009/10/30 v1.6 Font defs for Latin Modern
  mt-cmr.cfg    2013/05/19 v2.2 microtype config. file: Computer Modern Roman (
RS)
 ***********

The only difference I see is keyval.sty On TL it is 1.15 and on MikTex it is 1.13

Here is full console output from MikTex, which shows all the fonts loaded:

X:\data\latex\empty_page>pdflatex index.tex
This is pdfTeX, Version 3.1415926-2.5-1.40.14 (MiKTeX 2.9 64-bit)
entering extended mode
(X:\data\latex\empty_page\index.tex
LaTeX2e <2011/06/27>
Babel <v3.8m> and hyphenation patterns for english, afrikaans, ancientgreek, ar
abic, armenian, assamese, basque, bengali, bokmal, bulgarian, catalan, coptic,
croatian, czech, danish, dutch, esperanto, estonian, farsi, finnish, french, ga
lician, german, german-x-2013-05-26, greek, gujarati, hindi, hungarian, iceland
ic, indonesian, interlingua, irish, italian, kannada, kurmanji, latin, latvian,
 lithuanian, malayalam, marathi, mongolian, mongolianlmc, monogreek, ngerman, n
german-x-2013-05-26, nynorsk, oriya, panjabi, pinyin, polish, portuguese, roman
ian, russian, sanskrit, serbian, slovak, slovenian, spanish, swedish, swissgerm
an, tamil, telugu, turkish, turkmen, ukenglish, ukrainian, uppersorbian, usengl
ishmax, welsh, loaded.
("C:\Program Files\MiKTeX 2.9\tex\latex\base\report.cls"
Document Class: report 2007/10/19 v1.4h Standard LaTeX document class
("C:\Program Files\MiKTeX 2.9\tex\latex\base\size12.clo"))
("C:\Program Files\MiKTeX 2.9\tex\latex\base\fontenc.sty"
("C:\Program Files\MiKTeX 2.9\tex\latex\base\t1enc.def"))
(C:\Users\me\AppData\Roaming\MiKTeX\2.9\tex\latex\microtype\microtype.sty
("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\keyval.sty")
(C:\Users\me\AppData\Roaming\MiKTeX\2.9\tex\latex\microtype\microtype-pdftex.de
f) (C:\Users\me\AppData\Roaming\MiKTeX\2.9\tex\latex\microtype\microtype.cfg))
(C:\Users\me\AppData\Roaming\MiKTeX\2.9\tex\latex\lipsum\lipsum.sty)
(X:\data\latex\empty_page\index.aux)
(C:\Users\me\AppData\Roaming\MiKTeX\2.9\tex\latex\microtype\mt-cmr.cfg)
[1{C:/Users/me/AppData/Local/MiKTeX/2.9/pdftex/config/pdftex.map}
! pdfTeX error (font expansion): auto expansion is only possible with scalable
fonts.
<to be read again>
                   \endgroup \set@typeset@protect
l.9 \chapter
            {Introduction}
!  ==> Fatal error occurred, no output PDF file produced!
Transcript written on index.log.

Question is : Who is correct here? MikTeX or TL? Are these supposed to work the same way, since it is all Latex? I am just trying to understand what is going on, that is all :)


Update:

This is MiKTex console output when using T1 and lmodern but not using microtype

X:\data\latex\empty_page>pdflatex index.tex
This is pdfTeX, Version 3.1415926-2.5-1.40.14 (MiKTeX 2.9 64-bit)
entering extended mode
(X:\data\latex\empty_page\index.tex
LaTeX2e <2011/06/27>
Babel <v3.8m> and hyphenation patterns for english, afrikaans, ancientgreek, ar
abic, armenian, assamese, basque, bengali, bokmal, bulgarian, catalan, coptic,
croatian, czech, danish, dutch, esperanto, estonian, farsi, finnish, french, ga
lician, german, german-x-2013-05-26, greek, gujarati, hindi, hungarian, iceland
ic, indonesian, interlingua, irish, italian, kannada, kurmanji, latin, latvian,
 lithuanian, malayalam, marathi, mongolian, mongolianlmc, monogreek, ngerman, n
german-x-2013-05-26, nynorsk, oriya, panjabi, pinyin, polish, portuguese, roman
ian, russian, sanskrit, serbian, slovak, slovenian, spanish, swedish, swissgerm
an, tamil, telugu, turkish, turkmen, ukenglish, ukrainian, uppersorbian, usengl
ishmax, welsh, loaded.
("C:\Program Files\MiKTeX 2.9\tex\latex\base\report.cls"
Document Class: report 2007/10/19 v1.4h Standard LaTeX document class
("C:\Program Files\MiKTeX 2.9\tex\latex\base\size12.clo"))
("C:\Program Files\MiKTeX 2.9\tex\latex\base\fontenc.sty"
("C:\Program Files\MiKTeX 2.9\tex\latex\base\t1enc.def"))
("C:\Program Files\MiKTeX 2.9\tex\latex\lm\lmodern.sty")
(C:\Users\me\AppData\Roaming\MiKTeX\2.9\tex\latex\lipsum\lipsum.sty)
(X:\data\latex\empty_page\index.aux)
("C:\Program Files\MiKTeX 2.9\tex\latex\lm\t1lmr.fd") [1{C:/Users/me/AppData/Lo
cal/MiKTeX/2.9/pdftex/config/pdftex.map}]
Chapter 1.
[2] (X:\data\latex\empty_page\index.aux)

 *File List*
  report.cls    2007/10/19 v1.4h Standard LaTeX document class
  size12.clo    2007/10/19 v1.4h Standard LaTeX file (size option)
 fontenc.sty
   t1enc.def    2005/09/27 v1.99g Standard LaTeX file
 lmodern.sty    2009/10/30 v1.6 Latin Modern Fonts
  lipsum.sty    2014/07/27 v1.3 150 paragraphs of Lorem Ipsum dummy text
   t1lmr.fd    2009/10/30 v1.6 Font defs for Latin Modern
 ***********

 ){C:/Program Files/MiKTeX 2.9/fonts/enc/dvips/lm/lm-ec.enc}<C:/Program Files/M
iKTeX 2.9/fonts/type1/public/lm/lmbx12.pfb><C:/Program Files/MiKTeX 2.9/fonts/t
ype1/public/lm/lmr12.pfb>
Output written on index.pdf (2 pages, 53427 bytes).
Transcript written on index.log.

This is MikTex output, when using T1 and not using lmodern and also not using microtype

X:\data\latex\empty_page>pdflatex index.tex
This is pdfTeX, Version 3.1415926-2.5-1.40.14 (MiKTeX 2.9 64-bit)
entering extended mode
(X:\data\latex\empty_page\index.tex
LaTeX2e <2011/06/27>
Babel <v3.8m> and hyphenation patterns for english, afrikaans, ancientgreek, ar
abic, armenian, assamese, basque, bengali, bokmal, bulgarian, catalan, coptic,
croatian, czech, danish, dutch, esperanto, estonian, farsi, finnish, french, ga
lician, german, german-x-2013-05-26, greek, gujarati, hindi, hungarian, iceland
ic, indonesian, interlingua, irish, italian, kannada, kurmanji, latin, latvian,
 lithuanian, malayalam, marathi, mongolian, mongolianlmc, monogreek, ngerman, n
german-x-2013-05-26, nynorsk, oriya, panjabi, pinyin, polish, portuguese, roman
ian, russian, sanskrit, serbian, slovak, slovenian, spanish, swedish, swissgerm
an, tamil, telugu, turkish, turkmen, ukenglish, ukrainian, uppersorbian, usengl
ishmax, welsh, loaded.
("C:\Program Files\MiKTeX 2.9\tex\latex\base\report.cls"
Document Class: report 2007/10/19 v1.4h Standard LaTeX document class
("C:\Program Files\MiKTeX 2.9\tex\latex\base\size12.clo"))
("C:\Program Files\MiKTeX 2.9\tex\latex\base\fontenc.sty"
("C:\Program Files\MiKTeX 2.9\tex\latex\base\t1enc.def"))
(C:\Users\me\AppData\Roaming\MiKTeX\2.9\tex\latex\lipsum\lipsum.sty)
(X:\data\latex\empty_page\index.aux) [1{C:/Users/me/AppData/Local/MiKTeX/2.9/pd
ftex/config/pdftex.map}]
Chapter 1.
[2] (X:\data\latex\empty_page\index.aux)

 *File List*
  report.cls    2007/10/19 v1.4h Standard LaTeX document class
  size12.clo    2007/10/19 v1.4h Standard LaTeX file (size option)
 fontenc.sty
   t1enc.def    2005/09/27 v1.99g Standard LaTeX file
  lipsum.sty    2014/07/27 v1.3 150 paragraphs of Lorem Ipsum dummy text
 ***********

 ) <C:\Users\me\AppData\Local\MiKTeX\2.9\fonts\pk\ljfour\jknappen\ec\dpi600\ecb
x2488.pk> <C:\Users\me\AppData\Local\MiKTeX\2.9\fonts\pk\ljfour\jknappen\ec\dpi
600\ecrm1200.pk>
Output written on index.pdf (2 pages, 23789 bytes).
Transcript written on index.log.

Update 2

Using the MikTex package manager, it shows cm-super is not installed by default as the case with TL. So installed it on windows: (64 MB size)

starting package maintenance...
going to download 64797738 bytes
going to install 840 file(s) (1 package(s))
downloading http://ftp.math.purdue.edu/mirrors/ctan.org/systems/win32/miktex/tm/packages/cm-super.tar.lzma...

and now the first example above, compiles OK on MikTex. Here is the console output

pdflatex index.tex
This is pdfTeX, Version 3.1415926-2.5-1.40.14 (MiKTeX 2.9 64-bit)
entering extended mode
(X:\data\latex\empty_page\index.tex
LaTeX2e <2011/06/27>
Babel <v3.8m> and hyphenation patterns for english, afrikaans, ancientgreek, ar
abic, armenian, assamese, basque, bengali, bokmal, bulgarian, catalan, coptic,
croatian, czech, danish, dutch, esperanto, estonian, farsi, finnish, french, ga
lician, german, german-x-2013-05-26, greek, gujarati, hindi, hungarian, iceland
ic, indonesian, interlingua, irish, italian, kannada, kurmanji, latin, latvian,
 lithuanian, malayalam, marathi, mongolian, mongolianlmc, monogreek, ngerman, n
german-x-2013-05-26, nynorsk, oriya, panjabi, pinyin, polish, portuguese, roman
ian, russian, sanskrit, serbian, slovak, slovenian, spanish, swedish, swissgerm
an, tamil, telugu, turkish, turkmen, ukenglish, ukrainian, uppersorbian, usengl
ishmax, welsh, loaded.
("C:\Program Files\MiKTeX 2.9\tex\latex\base\report.cls"
Document Class: report 2007/10/19 v1.4h Standard LaTeX document class
("C:\Program Files\MiKTeX 2.9\tex\latex\base\size12.clo"))
("C:\Program Files\MiKTeX 2.9\tex\latex\base\fontenc.sty"
("C:\Program Files\MiKTeX 2.9\tex\latex\base\t1enc.def"))
(C:\Users\me\AppData\Roaming\MiKTeX\2.9\tex\latex\microtype\microtype.sty
("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\keyval.sty")
(C:\Users\me\AppData\Roaming\MiKTeX\2.9\tex\latex\microtype\microtype-pdftex.de
f) (C:\Users\me\AppData\Roaming\MiKTeX\2.9\tex\latex\microtype\microtype.cfg))
(C:\Users\me\AppData\Roaming\MiKTeX\2.9\tex\latex\lipsum\lipsum.sty)
(X:\data\latex\empty_page\index.aux)
(C:\Users\me\AppData\Roaming\MiKTeX\2.9\tex\latex\microtype\mt-cmr.cfg)
[1{C:/Users/me/AppData/Local/MiKTeX/2.9/pdftex/config/pdftex.map}]
Chapter 1.
[2] (X:\data\latex\empty_page\index.aux)

 *File List*
  report.cls    2007/10/19 v1.4h Standard LaTeX document class
  size12.clo    2007/10/19 v1.4h Standard LaTeX file (size option)
 fontenc.sty
   t1enc.def    2005/09/27 v1.99g Standard LaTeX file
microtype.sty    2013/05/23 v2.5a Micro-typographical refinements (RS)
  keyval.sty    1999/03/16 v1.13 key=value parser (DPC)
microtype-pdftex.def    2013/05/23 v2.5a Definitions specific to pdftex (RS)
microtype.cfg    2013/05/23 v2.5a microtype main configuration file (RS)
  lipsum.sty    2014/07/27 v1.3 150 paragraphs of Lorem Ipsum dummy text
  mt-cmr.cfg    2013/05/19 v2.2 microtype config. file: Computer Modern Roman (
RS)
 ***********

 ){C:/Users/me/AppData/Roaming/MiKTeX/2.9/fonts/enc/dvips/cm-super/cm-super-t1.
enc}<C:/Users/me/AppData/Roaming/MiKTeX/2.9/fonts/type1/public/cm-super/sfbx248
8.pfb><C:/Users/me/AppData/Roaming/MiKTeX/2.9/fonts/type1/public/cm-super/sfrm1
200.pfb>
Output written on index.pdf (2 pages, 32481 bytes).
Transcript written on index.log.

How are poor users supposed to know these things? Too many packages. If TL installs cm-super by default, I think MikTeX should also do the same.

  • What does it use if you omit microtype but still use T1? Do you get an error in that case? – cfr Dec 20 '15 at 4:48
  • @cfr when omitting microtype but still use T1, and also load lmodern, it works as mentioned above. As far what it uses, I will now post the console output for this case as well so you can see. I am not really familiar with fonts and what to look for. May be you can spot now the issue. – Nasser Dec 20 '15 at 4:52
  • You can see from the .logs that the fonts are not the same. The last one is not using scalable fonts, while the penultimate .log shows lmr12.pfb. But as for what MiKTeX is supposed to do, it's hard to say. Is there a manual that describes what MiKTeX thinks it is supposed to do? – jon Dec 20 '15 at 6:09
  • @Nasser TL installs everything by default. If that's what you want, I think it would be best to install TL. I take it one feature of MikTeX which attracts people is that it does not do this but can install packages on-the-fly. – cfr Dec 20 '15 at 20:13
15

TeX Live includes cm-super. If you write

\usepackage[T1]{fontenc}

then the fonts from cm-super are used and these are scalable. Therefore, you don't get an error.

I assume that you do not have cm-super installed for MikTeX and you, therefore, get the error. Otherwise, MikTeX does not default to these fonts for some reason, even if T1 is requested.

I don't have MikTeX so I don't know what it does in this case. But the error is not present in this case in TL for this reason.

In fact, with TeX Live 2015, scalable versions of Computer Modern are used even if T1 is not selected.

| improve this answer | |
  • Thanks. How does one check if cm-super is there/used or not? I did full installation of MikTex on windows. Also did full update about 2 months ago or so. I know nothing about cm-super or where to look for it. But will google it now. – Nasser Dec 20 '15 at 4:14
  • 1
    I think it has a package manager. You should be able to add it. To see what it is using, just look at the end of the console output. That's how I know TL 2015 is using type1 fonts regardless: the paths are .../type1/.../....pfb and not ....mf or ....pk as they would be otherwise. – cfr Dec 20 '15 at 4:17
  • Ok, I will put the full output on the console at the end of my question in this case now. – Nasser Dec 20 '15 at 4:18
  • 1
    @Nasser Check in the MiKTeX Package Manager. cm-super is relatively large so isn't in the 'basic' install bundle. – Joseph Wright Dec 20 '15 at 8:45
  • @JosephWright thanks. I use MikTeX package manager, and yes, it was not installed. Installed cm-super and now the error went away. I think Miktex should installed cm-super by default just like TL in this case. – Nasser Dec 20 '15 at 10:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.