Open bgvoisin opened 7 years ago
I agree this is not good. In the short term I’m sure you know that you can fix this by loading the package with a kind of backwards compatibility:
\usepackage[mathbf=sym]{unicode-math}
I haven’t been able to trim this down to a minimal example yet… even if I do I’m not sure if XeTeX is being actively maintained at the moment, so it’s good to know it currently works in LuaTeX.
Math accents seem to now give errors when applied to old-style math alphabet commands like \mathbf, and to be just fine when applied to new-style commands like \symbf. Maybe this is known, but I don't remember seeing it mentioned in the unicode-math doc.
I realized that while answering a question to the lucida list, about adapting lucida-amsmath.tex to use the Lucida OpenType fonts. The matter, however, is not specific to Lucida. It is triggered by line 171 of lucida-amsmath.tex
\wh{\mathbf{K}}(i|i),\qquad i=1,\dots,n.
where \wh = \widehat (credit to John Lienhard for identifying this line as the culprit). Any math accent gives the same result. Possible test code:
`\documentclass{article}
\usepackage{kantlipsum}
\usepackage{fontspec} \usepackage{unicode-math} \setmainfont{lmroman10-regular.otf} \setmathfont{latinmodern-math.otf}
\begin{document}
\kant[1-5]
\begin{equation} \widehat{\mathbf{K}}(i|i),\qquad i=1,\dots,n. \end{equation}
\end{document} `
Remove \kant[1-5] so the faulty equation occurs before a page break, the console output with XeLaTeX is
and XeLaTeX hangs forever. Leave \kant[1-5] so the faulty equation occurs after a page break, output is
and the run is terminated. With LuaLaTeX, everything's just fine.