latex3 / unicode-math

XeLaTeX/LuaLaTeX package for using unicode/OpenType maths fonts
http://ctan.org/pkg/unicode-math
LaTeX Project Public License v1.3c
241 stars 28 forks source link

Discrepancy in vertical spacing when using `\underbrace` in display math #453

Open jfbu opened 6 years ago

jfbu commented 6 years ago

Description

There is a discrepancy in vertical spacing between xelatex and lualatex output when using \underbrace in display math.

Check/indicate

Minimal example demonstrating the issue

\documentclass[a4paper]{article}
\usepackage[left=0cm,right=12cm]{geometry}
%\usepackage{fontspec}
\usepackage{unicode-math}
\usepackage[grid]{eso-pic}
\begin{document}
Before
\[ \underbrace{AAA}_{B}\]
\[ \underbrace{AAA}_{B}\]
\[ \underbrace{AAA}_{B}\]
\[ \underbrace{AAA}_{B}\]
\[ \underbrace{AAA}_{B}\]
\[ \underbrace{AAA}_{B}\]
\[ \underbrace{AAA}_{B}\]
\[ \underbrace{AAA}_{B}\]
After
\end{document}

Further details

When commenting out unicode-math and loading only fontspec no issue. The issue was observed also when using \setmathfont{TeX Gyre Pagella Math}.

(tested with TeXLive 2018 pretest updated as of today March 25, 2018)

jfbu commented 6 years ago

An edit to the tex.sx question showing the phenomenon in Plain TeX, hence it is appears not related to unicode-math.

Could unicode-math compensate? if that does not make sense, probably better to close this issue ;-)