Kolaru / MathTeXEngine.jl

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

Reduced Planck constant should be italic #98

Closed AshtonSBradley closed 1 year ago

AshtonSBradley commented 1 year ago

In CairoMakie, when I do

ax.xlabel = L"\hbar\omega"

I get this

Screenshot 2023-02-16 at 9 49 16 AM

which is not correct as \hbar should be italic like this:

Screenshot 2023-02-16 at 9 50 20 AM
AshtonSBradley commented 1 year ago

Is there any fix or workaround for this? I don't think I have ever encountered a roman \hbar in quantum literature... it stands out as quite anomalous

Kolaru commented 1 year ago

Took me some times to find the correct glyph, but should be fixed in 0.5.6 I'm realeasing now.

AshtonSBradley commented 1 year ago

Thanks for the fix!!

apoorvpotnis commented 1 year ago

Planck's constant is a fixed numerical quantity since 2019. Shouldn't it be upright as variables are italic and constants upright, according to the ISO norms?

Kolaru commented 1 year ago

I'm trying to follow TeX convention as they are the most used. So the upright hbar should be available through \mathrm{\hbar}.

AshtonSBradley commented 1 year ago

yeah, for quantum theory papers upright looks awful. Good to have it available as upright somehow, but personally I am glad to see italic default as it is used universally