latex3 / unicode-math

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

Consecutive big delimiters are misaligned if \smash appears in their subscripts #383

Closed EdwinChan closed 7 years ago

EdwinChan commented 7 years ago

I'm using version 2017/01/27 v0.8d. The source

\documentclass{article}
\usepackage{amsmath,unicode-math}
\begin{document}
\[\biggl(\frac XY\biggr)_{\smash Z}\biggl(\frac XY\biggr)_{\smash Z}\]
\[\biggl[\frac XY\biggr]_{\smash Z}\biggl[\frac XY\biggr]_{\smash Z}\]
\[\biggl\{\frac XY\biggr\}_{\smash Z}\biggl\{\frac XY\biggr\}_{\smash Z}\]
\end{document}

typesets to the following; clearly the second pair of delimiters on each line is incorrectly shifted downward:

output

godbyk commented 7 years ago

The fraction bar is heavier, too.

davidcarlisle commented 7 years ago

You are using xetex? (I see this with xetex but not luatex)

EdwinChan commented 7 years ago

@davidcarlisle That's correct; I'm using XeLaTeX 3.14159265-2.6-0.99996 that comes with TeX Live 2016.

davidcarlisle commented 7 years ago

This seems to be a xetex engine issue, not fontspec as I can reproduce with plain Tex

\font\m= "[latinmodern-math.otf]/OT:script=math;language=DFLT;" at 10pt
\font\sm= "[latinmodern-math.otf]/OT:script=math;language=DFLT;" at 7pt
\font\ssm= "[latinmodern-math.otf]/OT:script=math;language=DFLT;" at 5pt

\textfont0=\m
\scriptfont0=\sm
\scriptscriptfont0=\ssm
\textfont1=\m
\scriptfont1=\sm
\scriptscriptfont1=\ssm
\textfont2=\m
\scriptfont2=\sm
\scriptscriptfont2=\ssm
\textfont3=\m
\scriptfont3=\sm
\scriptscriptfont3=\ssm

$$
\biggl({X\over Y}\biggr)_{\smash Z}
\biggl({X\over Y}\biggr)_{\smash Z}
$$

\bye
u-fischer commented 7 years ago

With miktex there is no problem. The xetex version number is the same as in texlive but the miktex has been compiled with newer libraries. E.g. harfbuzz version 1.4.1 versus version 1.2.6.

Imho the problem it is part of a number of questions and bug reports regarding leaking fontdimens (e.g. https://sourceforge.net/p/xetex/bugs/75/#b012 and https://tex.stackexchange.com/questions/281549/why-is-the-fraction-off-the-math-axis-in-xetex) which have been be fixed in the development version and that miktex already has this fixes but the newer libraries could be also the cause that miktex behaves better.

wspr commented 7 years ago

I'm going to close this as an issue here, although discussion can by all means continue; unfortunately I don't have the capacity to follow up engine problems at this stage...