latex3 / unicode-math

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

Bad horizontal placement of overbrace/overbracket over \Leftrightarrow #608

Open castilma opened 1 year ago

castilma commented 1 year ago

Description

The overbrace/overbrackets aren't centered horizontaly over \Leftrightarrow and \Longleftrightarrow, but slightly offset to the left.

Add info or delete as appropriate:

Minimal example demonstrating the issue

\documentclass{article}
%\usepackage{mathtools} % no problem with mathtools without unicode-math
\usepackage{unicode-math} % has misaligned \overbrace{\Leftrightarrow}
\begin{document}
\[\Leftrightarrow  
\overbrace{\Leftrightarrow}^{b} 
\overbrace{\Longleftrightarrow}^{b}
\overbracket{\Leftrightarrow}^{b}
\overbracket{\Longleftrightarrow}^{b}
\]
\end{document}

Here is the output using unicode-math: unicode-math

And here with mathtools: mathtools

Further details

lualatexlog latexbrace.log

Package: unicode-math 2020/01/31 v0.8q Unicode maths in XeLaTeX and LuaLaTeX

khaledhosny commented 3 months ago

This seems to be caused by the extra braces introduced in https://github.com/latex3/unicode-math/commit/03b6d97312ca80fa4acb2d2cb04273c46563ca02 to fix https://github.com/latex3/unicode-math/issues/391. Removing the extra braces fixes this issue, and the original issue does not return.