stefnotch / aftermath-editor

A WYSIWYG mathematics editor that understands your formulas!
https://stefnotch.github.io/aftermath-editor
MIT License
14 stars 0 forks source link

_^ is sensible, while ^_ is not always reasonble #69

Open stefnotch opened 1 year ago

stefnotch commented 1 year ago

So a_i^2 makes sense. It's $(a_0)^2$.

However, if one swaps the symbols like a^2_i, then the result is a lot weirder. It'd be $(a^2)_i$, which probably should always be written with brackets.

However a^'_i is reasonable again. Like $(a^\prime)i$. But all the editors that I checked out went "naaah fam, we are normalizing it to ^". Which is potentially for the best.

Or maybe "when I'm in an exponent, I whip out a specialized parser". And that specialized parser can do stuff like parsing *, ', \hat and more. Do note that this is technically still compatible with "merging subsup". But I want stuff like ${a'}^{2x+1}$ or ${\hat{a}^2}$ to be possible.