Consider the rendering of \middle|
in the code below:
\documentclass[12pt,a4paper]{article}
\usepackage{unicode-math}
\setmathfont{xits-math.otf}
\begin{document}
\[ \left\lbrace p_{i,j} \, \middle| \, 1 \le i \le k_j, 0 \le j \le N \right\rbrace \]
\[ N \left[ f \right] = \left\lbrace x \in N \, \middle| \, f \cdot x = 0 \right\rbrace \]
\end{document}
XeTeX produces the following output:
On the other hand, LuaTeX produces this:
It's not hard to see that XeTeX renders only the first line correctly while LuaTeX renders only the second line correctly. A similar problem happens if I swap Asana Math for XITS, so it seems to be an engine problem rather than a font problem. The problem disappears if I change from unicode-math
to mathspec
, so it appears to be specific to unicode-math
.
Clearly, there is an execution path which makes \middle
work correctly (in the sense of being consistent with \left
and \right
: how do I force \middle
to be rendered that way when using unicode-math
?
Asana-Math
andLatin Modern Math
produce consistent results on both lines with lualatex (although I am not too keen on the font itself). the*brace
|
and[ ]
are all tall enough to fit the line. I suspect it might be a version problem and an unresolved bug inXITS