ReTeX / ReX

ReX - typesetting mathematics
121 stars 8 forks source link

Script/ScriptScriptStyle radicals have wrong height #10

Closed cbreeden closed 7 years ago

cbreeden commented 7 years ago

While troubleshooting some inconsistency with radical layout, I tested:

\sqrt{\int x}\textstyle\sqrt{\int x}\scriptstyle\sqrt{\int x}\scriptscriptstyle\sqrt{\int x} 

The first two gave identical results with LuaLaTeX and Rex, but the last two are shown here:

image

The left is ReX and the right is LuaTeX.

cbreeden commented 7 years ago

LuaLaTeX math parameters found with ie: \showthe\Umathradicalvgap\scriptscriptstyle

vgap display = 1.85997pt vgap text = 0.81998pt vgap script = 0.57399pt vgap sscript = 0.40999pt

These numbers (after rescaling to font units, essentially multiply by 100) agree with ReX, and show that the vgap is scaled by the current style.

cbreeden commented 7 years ago

LuaTeX seems to be using the same data for finding an extendable glyph for sqrt: https://github.com/pgundlach/LuaTeX/blob/0103f2225615b198516ecf5f0e8e100e2b4d2d2c/source/texk/web2c/luatexdir/tex/mlist.w#L1891

I suspect there is something different about our extendable glyph algorithm, but it isn't obvious what. Closing for now.