My statement that "I have not updated any part of the system" was not entirely correct. I have installed latex2html
package through homebrew
, which, quite unexpectedly, installs several style files into the user-local TeX home directory. Among these files is an ancient version of url.sty
which seems to conflict with pretty much everything. Removing this style file fixes the issue.
This is the consequence of a bad decision in unicode-math
: they named \mathit
the normal math italic letters, instead of respecting the LaTeX convention of referring to them as \mathnormal
; \mathit
should choose the text italic font, in order to make unicode-math
a drop-in replacement.
I wouldn't expect different output when unicode-math
is loaded or not; but this simple example shows the bug:
\documentclass{article}
%\usepackage{unicode-math}
\begin{document}
$\mathit{different}$
$different$
\end{document}
If the line with unicode-math
is commented out, we get
If I uncomment the line, I get
which is definitely wrong.
Workaround:
Define a new math alphabet:
\documentclass{article}
\usepackage{unicode-math}
\DeclareMathAlphabet{\Lmathit}{\encodingdefault}{\familydefault}{m}{it}
\begin{document}
$\Lmathit{different}$
$different$
\end{document}
If you use lhs2TeX
, you can add
\renewcommand{\Conid}[1]{\Lmathit{#1}}
\renewcommand{\Varid}[1]{\Lmathit{#1}}
after loading it.
This shouldn't raise the Too many math alphabets
error; if it does, then add the code you find between \makeatletter
and \makeatother
in https://tex.stackexchange.com/a/100428/4427
Best Answer
It works with the development version of
expl3
, seems to have got ahead of ctan release, this will work in the meantime.