0

I have

\documentclass[a4paper,11pt,draft]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[american]{babel}
%\usepackage[sups]{XCharter}
\usepackage[final]{microtype}
\usepackage{lipsum} %

\begin{document}

\lipsum

\end{document}

When I run pdflatex on this file, I get an error:

pdfTeX error (font expansion): auto expansion is only possible with scalable fonts.    

If I uncomment the \usepackage[sups]{XCharter} line, I get this error:

Package fontenc Error: Encoding file `t2aenc.def' not found.

A google search shows this has something to do with cyrillic, but that's obviously not relevant. The problem persists after a complete reinstall of texlive, and it started after an upgrade to Debian 10.

I'm not sure whether this is a texlive or a Debian problem and should be reported as a bug to Debian. Does anyone have any advice?

1

There are two separate issues here:

  1. If you want to use microtype with the default Computer Modern font family, you can install the cm-super package:

    apt install cm-super
    

    for Debian 10 (requires using sudo or another mean to gain root privileges). The cm-super package replaces bitmap fonts by their PostScript equivalents, which are scalable.

  2. The XCharter package unconditionally requires fontenc with T2A option (among a few others). So if you want to use the package, you'd have to install the support for Cyrillics in LaTeX:

    apt install texlive-lang-cyrillic
    

    should do that in Debian 10.

  • Thanks, it works now. But I'm still a bit puzzled. I know for certain that I didn't have either cm-super or texlive-lang-cyrillic installed, but the document still compiled without any problems before the update. Moreover, if texlive-lang-cyrillic is not available, I get the fatal error, but the document still compiles fine. I wonder what changed with the update. – GrB Sep 8 at 19:28
  • Without cm-super you just can't use microtype fully, but the error isn't fatal, it's just a warning. On the other hand, fontenc makes error about T2A fatal, but since you don't use any Cyrillics in the text, you can ignore the error. Though you can't avoid it without installing texlive-lang-cyrillic. It's just how the XCharter package written. – Sergei Golovan Sep 8 at 19:35
  • But that just makes it even more mysterious why all of it worked before (no warning by microtype, no fatal error by XCharter). – GrB Sep 8 at 19:47
  • I don't have older TeXLive at the moment, but I guess that Cyrillic support was added to XCharter only recently. As for microtype I'm not sure why there weren't any warning earlier. – Sergei Golovan Sep 8 at 19:50

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.