Closed gadmm closed 6 years ago
Thanks, this is obviously a pretty serious bug. I’ll do my best to get a fix out ASAP.
I found a workaround for now, which is to have a working font in the last call to setmathfont, e.g.
\documentclass{article}
\usepackage{fontspec}
\usepackage{unicode-math}
\setmathfont{xits-math.otf}
\setmathfont[range={\rightarrow}]{Latin Modern Math}
\setmathfont[range={\dummysymbol}]{xits-math.otf}
\begin{document}
$\left(\right.$
\end{document}
where \dummysymbol is a symbol I want in XITS anyway
I noticed this has to do with the empty delimiter. If you write $\left.\right.$
then you have the error twice.
This seems much related to http://tex.stackexchange.com/questions/154001/ and the fact that \setmathfont
can change the delcode of the period. It seems to happen nonetheless in XeLaTeX and only with range
specified with LuaLaTeX.
The following test file
\documentclass{article}
\usepackage{unicode-math}
\showthe\Udelcodenum`.
\setmathfont{XITS Math}
\showthe\Udelcodenum`.
\setmathfont[range=\int]{Latin Modern Math}
\showthe\Udelcodenum`.
\stop
shows, with XeLaTeX,
> 0.
l.4 \showthe\Udelcodenum`.
?
> 1073741824.
l.8 \showthe\Udelcodenum`.
?
> 1082130432.
l.12 \showthe\Udelcodenum`.
and, with LuaLaTeX,
> 0.
l.4 \showthe\Udelcodenum`.
?
(load luc: /usr/local/texlive/2016/texmf-var/luatex-cache/generic/fonts/otl/xit
s-math.luc)(load luc: /usr/local/texlive/2016/texmf-var/luatex-cache/generic/fo
nts/otl/xits-mathbold.luc)
> 0.
l.8 \showthe\Udelcodenum`.
?
(load luc: /usr/local/texlive/2016/texmf-var/luatex-cache/generic/fonts/otl/lat
inmodern-math.luc)
> 4194304.
l.12 \showthe\Udelcodenum`.
Possible manifestation of the same bug in xelatex + elsarticle + “Asana Math” + \right. = ↯ :
\documentclass{elsarticle}
\usepackage{unicode-math}
\setmathfont[range={\setminus}]{Asana Math}
\begin{document}
\(\left( \right.\)
\end{document}
The following example
triggers the following error with XeLaTeX:
The problem appears for any range specification and for many fonts replacing Latin Modern Math.
The bug appeared after upgrading to Ubuntu 16.04 and still present in unicode-math 2015/09/24 v0.8c. It causes documents which used to compile not to compile anymore (notably with lyx, which stops the compilation when such errors are found).