28

With TeX Live 2017, microtype has started producing dozens of unknown slot number warnings. This does not happen with TeX Live 2016 (fully updated). Here is an MWE:

\documentclass{article}
\usepackage{fontspec}
\setmainfont{Georgia}
\usepackage[english]{babel}
\usepackage{microtype}
\begin{document}
Test.
\end{document}

This produces dozens of warnings, starting with these two:

Package microtype Warning: Unknown slot number of character
(microtype)                `\`A'
(microtype)                in font encoding `TU' in inheritance list
(microtype)                `microtype.cfg/358(protrusion)'.


Package microtype Warning: Unknown slot number of character
(microtype)                `\'A'
(microtype)                in font encoding `TU' in inheritance list
(microtype)                `microtype.cfg/358(protrusion)'.

The list goes all the way to z, and might include every accented character. I get the same error with Cardo,Gentium Plus, and Times New Roman (all the fonts I tested).

This seems to be a bug.

  • 2
    I can confirm this, unfortunately – user31729 Jun 6 '17 at 17:05
  • I had this problem, too, but it is gone now. Does microtype have a public repository and a bug tracker, e.g. on github? I could not find it and it is not mentione on the CTAN page ctan.org/pkg/microtype – matth Jul 18 '17 at 10:32
21

This is due to a change in how latex declares legacy (LICR) input for unicode characters (the warnings only crop up with TU encoding, i.e., with xelatex or lualatex, and only for microtype settings that contain LICR input – in your case, the default settings).

EDIT: This issue has been fixed with version 2.7 of microtype.


Solution for older versions of the microtype package:

\makeatletter
\def\MT@is@composite#1#2\relax{%
  \ifx\\#2\\\else
    \expandafter\def\expandafter\MT@char\expandafter{\csname\expandafter
                    \string\csname\MT@encoding\endcsname
                    \MT@detokenize@n{#1}-\MT@detokenize@n{#2}\endcsname}%
    % 3 lines added:
    \ifx\UnicodeEncodingName\@undefined\else
      \expandafter\expandafter\expandafter\MT@is@uni@comp\MT@char\iffontchar\else\fi\relax
    \fi
    \expandafter\expandafter\expandafter\MT@is@letter\MT@char\relax\relax
    \ifnum\MT@char@ < \z@
      \ifMT@xunicode
        \edef\MT@char{\MT@exp@two@c\MT@strip@prefix\meaning\MT@char>\relax}%
          \expandafter\MT@exp@two@c\expandafter\MT@is@charx\expandafter
            \MT@char\MT@charxstring\relax\relax\relax\relax\relax
      \fi
    \fi
  \fi
}
% new:
\def\MT@is@uni@comp#1\iffontchar#2\else#3\fi\relax{%
  \ifx\\#2\\\else\edef\MT@char{\iffontchar#2\fi}\fi
}
\makeatother
| improve this answer | |
  • Thank you. This works. Please let us know here when the package is updated. – jcr Jun 7 '17 at 18:01
  • There seems to be another issue, I'm getting pdfTeX error (font expansion): auto expansion is only possible with scalable fonts. with texlive 2017 in file that compiled with texlive 2016 and the fonts MyriadPro. I just don't have the time to build a MWE. – Keks Dose Jun 9 '17 at 8:46
  • @KeksDose This means that you are using a non-Type 1 font. See here, e.g.: https://tex.stackexchange.com/questions/10706/pdftex-error-font-expansion-auto-expansion-is-only-possible-with-scalable, especially Ulrike's answer – Robert Jun 9 '17 at 14:08
  • 1
    @Robert OK, was a stupid question and no connection to microtype. I forgot to enable the map files of my local tree! – Keks Dose Jun 9 '17 at 16:48
  • 3
    @Robert I have microtype 2.7a but still get the errors - the microtype package seems to have something that looks like your fix. I use LuaLaTeX – Jean-Michaël Celerier Jul 7 '18 at 10:24

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.