Kolaru / MathTeXEngine.jl

A latex math mode engine in pure Julia.
MIT License
97 stars 19 forks source link

Height of exponents doesn't change with () vs. \left( \right) #105

Open 70Gage70 opened 1 year ago

70Gage70 commented 1 year ago
using CairoMakie

fig = Figure(
    resolution = (1920, 1080), 
    fontsize = 50,
    figure_padding = (50, 50, 50, 50));

ax1 = Axis(fig[1, 1], title = L"(\frac{A^{xy}}{B})^{1/4}")
ax2 = Axis(fig[1, 2], title = L"\left(\frac{A^{xy}}{B}\right)^{1/4}")

save("exponents.png", fig)

exponents

Compare to the same formula in Overleaf:

good
Kolaru commented 1 year ago

Hmm I would have to figure what the rule should be to fix that. Currently the baseline of the exponent is at a fixed percentage of the height.