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@ls@fontspec@colon#1:#2:#3:#4\@nil{%
\ifx\\#3\\#1:#2\else#1:#2:#3\fi}
\def\MT@ls@fontspec@font#1 #2\@nil{%
"\MT@ls@fontspec@colon#1:::\relax\@nil
kernfactor=\MT@minus \ifnum\MT@letterspace@=1000 1\else 0.%
\ifnum\MT@minus\MT@letterspace@<100 0\fi
\ifnum\MT@minus\MT@letterspace@<10 0\fi
\number\MT@minus\MT@letterspace@ \fi;"
\ifx\\#2\\ at \f@size pt\else#2\fi\relax
}
after microtype.
Best,
--
Robert