sciapp / gr

GR framework: a graphics library for visualisation applications
Other
329 stars 54 forks source link

Adaptive superscript height #186

Closed gustaphe closed 1 month ago

gustaphe commented 1 month ago

Close #147 , Close jheinen/GR.jl#402

For BT_HLIST nodes with no subsuper_height, use the actual height of the hlist to determine exponent height. This gets a lot closer to the LaTeX result. I don't know what the edge cases are here, but I ran a bit of a comparison:

Input

x_a^b = \mathrm{y}_x^{-1} + \prod_0^\infty \mathrm{X}_0^2\left(\mathit{c}_3^4\right)_1^2

Original LaTeX

tex

GR, before PR

before

GR, after PR

after

jheinen commented 1 month ago

Thanks for the PR. I'll merge it into our development branch, run the CI tests and then merge it back into master and make a new release (soon).