[lltx] microtype's \textls command broken in current TeX Live

Reinhard Kotucha reinhard.kotucha at web.de
Sat Feb 11 00:33:50 CET 2017


On 2017-02-10 at 23:23:37 +0100, Robert wrote:

 > On 10.02.17 22:22, Reinhard Kotucha wrote:
 >  > Dear Sirs,
 >  > the minimal example below doesn't work anymore.
 >  >
 >  > ---------------------------------------------------------------
 >  > \documentclass{article}
 >  > \usepackage{fontspec} \setmainfont{TeX Gyre Pagella}
 >  > \usepackage{microtype}
 >  > \usepackage{unicode-math} \setmathfont{texgyrepagella-math.otf}
 >  >
 >  > \begin{document}
 >  > \textls[30]{$x$}
 >  > \end{document}
 >  > ---------------------------------------------------------------
 >  >
 >  > The problem occurs if the mandatory argument of \textls contains
 >  > stuff in math mode.  Any idea?
 > 
 > It's actually not the math mode, but the file spec that microtype 
 > stumbles over. Try with:
 > 
 > \def\MT at ls@fontspec at colon#1:#2:#3:#4\@nil{%
 >    \ifx\\#3\\#1:#2\else#1:#2:#3\fi}
 > \def\MT at ls@fontspec at font#1 #2\@nil{%
 >    "\MT at ls@fontspec at colon#1:::\relax\@nil
 >      kernfactor=\MT at minus \ifnum\MT at letterspace@=1000 1\else 0.%
 >           \ifnum\MT at minus\MT at letterspace@<100 0\fi
 >           \ifnum\MT at minus\MT at letterspace@<10  0\fi
 >          \number\MT at minus\MT at letterspace@ \fi;"
 >    \ifx\\#2\\ at \f at size pt\else#2\fi\relax
 > }
 > 
 > after microtype.

Hi Robert,
thanks for the amazingly fast response.  But with

------------------------------------------------------------------
\documentclass{article}
\usepackage{fontspec} \setmainfont{TeX Gyre Pagella}
\usepackage{microtype}

\makeatletter
\def\MT at ls@fontspec at colon#1:#2:#3:#4\@nil{%
   \ifx\\#3\\#1:#2\else#1:#2:#3\fi}
\def\MT at ls@fontspec at font#1 #2\@nil{%
   "\MT at ls@fontspec at colon#1:::\relax\@nil
     kernfactor=\MT at minus \ifnum\MT at letterspace@=1000 1\else 0.%
          \ifnum\MT at minus\MT at letterspace@<100 0\fi
          \ifnum\MT at minus\MT at letterspace@<10  0\fi
         \number\MT at minus\MT at letterspace@ \fi;"
   \ifx\\#2\\ at \f at size pt\else#2\fi\relax
}
\makeatother

\usepackage{unicode-math} \setmathfont{texgyrepagella-math.otf}

\begin{document}
\textls[30]{$x$}
\end{document}

% Local Variables:
%  TeX-engine: luatex
% End:
------------------------------------------------------------------

lualatex still complains:

------------------------------------------------------------------
(/xopt/texlive/2016/texmf-dist/tex/latex/microtype/mt-msb.cfg)...xmf-dist/tex/l
uatex/luaotfload/fontloader-basics-gen.lua:113: bad argument #2 to 'find_file' 
(invalid option 'otfkernfactor=0').
<to be read again> 
relax 
l.28 \textls[30]{$^2$}
------------------------------------------------------------------

luaotfload and unicode-math are the only packages which were updated
recently and everything still worked like a charm a few weeks ago.

Regards,
  Reinhard

-- 
------------------------------------------------------------------
Reinhard Kotucha                            Phone: +49-511-3373112
Marschnerstr. 25
D-30167 Hannover                    mailto:reinhard.kotucha at web.de
------------------------------------------------------------------


More information about the lualatex-dev mailing list