Using the \lsstyle command gives wrong math latterspacing afterwards. I came upon this problem when using the classicthesis and putting math in a section (microtype is used there too). After the section is rendered, math letterspacing is wrong from then on.

Minimal working example



Before: $\MyOp(1,2,3)$. % this is how it should be.

{\lsstyle $X^2 + Y^2 = Z^2$} % \lsstyle and math inside a group.

After: $\MyOp(1,2,3)$. % now math has wrong letterspacing.



enter image description here


Any ideas how to fix this? I would especially be interesting in a fix working with classicthesis. You can see the problem here:



\section{Usual section works fine}

\[ \int f(x) \mathrm dx, \; \diag(a_1, \ldots, a_n), \; \ker(f) \]

\section{But some math in a title $X^2+Y^2=Z^2$ messes it up}

\[ \int f(x) \mathrm dx, \; \diag(a_1, \ldots, a_n), \; \ker(f) \]


enter image description here


Yes, that's a bug in microtype. Until the package is updated, a temporary fix would be to add


after the \lsstyle and math inside a group, which forces the math fonts to be set up anew.

EDIT: This has been fixed in microtype v2.6.

  • I think that the fix in 2.6. is problematic (the change in \MT@set@tr@codes) see tex.stackexchange.com/questions/316231/…. Wouldn't it be better to add \aftergroup\glb@settings to the \lsstyle definition like e.g. \mathversion does? It seems to solve the problem too. – Ulrike Fischer Jun 23 '16 at 12:14

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.