6

Would anyone know what is the problem of the interaction of amsart and microtype under xelatex -- that does not happen under latex, pdflatex or lualatex?

With the file:

\documentclass{amsart}
\usepackage{microtype}

\begin{document}

 \begin{abstract}
    This is a test.
 \end{abstract}
 \end{document}

I get the not so clear message:

(/usr/local/texlive/2017/texmf-dist/tex/latex/microtype/mt-LatinModernRoman.cfg)
! Bad character code (-815).
<to be read again> 
               h
l.6      \begin{abstract}
  • with tex live 2016, i get no error message. everything goes through smoothly, although there is no output. so presumably this is something that happened with tex live 2017 or later (which i don't have available). – barbara beeton Feb 20 '18 at 20:02
  • @barbarabeeton I get the error in tl2017 – David Carlisle Feb 20 '18 at 20:08
  • If I use pdflatex I get no pdf produced. If I use pdflatex and add some text below the abstract I get that text but no abstract. This is with a fully updated TL2017. If I even remove the loading of microtype there are problems. So things aren't quite right with pdflatex either. – Herb Schulz Feb 20 '18 at 20:56
  • @HerbSchulz -- in order to get the abstract to print, amsart requires the use of \maketitle. – barbara beeton Feb 20 '18 at 21:03
  • I took the \maketitle line out to make a real MWE ... :) – Paulo Ney Feb 20 '18 at 22:09
7

There is imho a bug in microtype. When fontspec is not loaded it retrieve the wrong glyph slots in some cases and this leads to errors. This is not related to amsmart. You would get the same error with article, if you use \scshape. I already made a bug report. As a work-around I would advise to load fontspec:

\documentclass{amsart}
\usepackage{fontspec}
\usepackage{microtype}

\begin{document}

 \begin{abstract}
    This is a test.
 \end{abstract}
 \end{document}
2

If you take a copy of

/usr/local/texlive/2017/texmf-dist/tex/latex/microtype/mt-LatinModernRoman.cfg

and save it in the directory with your document then comment out lines 192-196 so it looks like.

%    /one.oldstyle   = {100,100},
%    /two.oldstyle   = { 50, 50},
%    /three.oldstyle = { 30, 80},
%    /four.oldstyle  = { 50, 50},
%    /seven.oldstyle = { 50, 80},

Then your document runs without error.

  • I have no idea why that failed, but you could use this as a pointer if you raise an issue with the microtype maintainer – David Carlisle Feb 20 '18 at 20:32
  • actually just % /two.oldstyle = { 50, 50}, is sufficient, the other lines are OK – David Carlisle Feb 20 '18 at 20:36
  • I'll leave this up as a debugging aid, but you should accept Ulrike's answer – David Carlisle Feb 20 '18 at 22:53

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.