# xelatex + unicode-math + \big = ↯

(Note: See EDIT below that rules out both stackengine and standalone as the culprit)

Input:

\documentclass{standalone}
\usepackage{unicode-math}
\usepackage{stackengine}\stackMath
\begin{document}
$$\bigl[ , \mathchoice% {}% {}% {}% {\stackunder{\scriptscriptstyle a}{}} \bigr]$$
\end{document}


We expect the output [,] with same-size vertically aligned brackets. However, the output is as follows:

The brackets have different sizes and irregular vertical placement, which is wrong: they should have the same size and be vertically aligned. Using \Big, \bigg, etc. instead of \big produces similarly erroneous output. Removing \usepackage{unicode-math}, or, \scriptscriptsize, or, a, or \stackunder doesn't trigger the bug any more. The compilation was done with the following software versions:

• XeTeX, Version 3.14159265-2.6-0.99996 (TeX Live 2016/Debian) (preloaded format=xelatex 2017.4.2)
• LaTeX2e <2017/01/01> patch level 3
• standalone 2015/07/15 v1.2 (NOT responsible)
• unicode-math 2015/09/24 v0.8c
• stackengine 2016/10/04 v4.00 (NOT responsible)

Who is the culprit and what to do?

EDIT by S.B. Segletes

The stackengine package is shown not to be the culprit, by the following MWE, which produces the identical wrong result without the use of stackengine. Changing standalone to article also does not correct the issue.

\documentclass{standalone}
\usepackage{unicode-math}
\begin{document}
$$\bigl[ , \mathchoice% {}% {}% {}% {\hbox{\scriptscriptstyle a}} \bigr]$$
\end{document}

• the brackets are the same size for me with xelatex in texlive 2017 – David Carlisle Jun 16 '17 at 22:32
• I'm pretty sure it's again this one: Why is the fraction off the math axis in XeTeX? Fontdimens have been messed up (and are still not entirely correct) in XeTeX before TL2017. Upgrade your TeXlive and you should be fine or switch to LuaTeX. – Henri Menke Jun 17 '17 at 2:02
• @LeonMeier I think it was a fix in the xetex binary itself so will not be available in a texlive 2016 update – David Carlisle Jun 17 '17 at 7:44
• I can also confirm this behavior for my MikTeX installation. Not sure which packages or configurations need updating... – Steven B. Segletes Jun 19 '17 at 10:41
• I have provided the MWE that excludes stackengine as the culprit. – Steven B. Segletes Jun 19 '17 at 15:19

This is the output of the original code (including stackengine) with the new release
• @StevenB.Segletes Of course not. ;-) – egreg Jun 19 '17 at 17:19