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@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.
Hi Robert,
thanks for the amazingly fast response. But with
------------------------------------------------------------------
\documentclass{article}
\usepackage{fontspec} \setmainfont{TeX Gyre Pagella}
\usepackage{microtype}
\makeatletter
\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
}
\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:[email protected]
------------------------------------------------------------------