Open stefnotch opened 1 year ago
"Integral" should just insert the integral symbol and the renderer should hint at the fact that "sub" and "sup" are possible. Including with a point-and-click ability. Like click on the bottom of the lonely integral symbol and a sub automatically gets inserted. Note that those should not be rendered like normal placeholders. After all, you cannot move into them using arrow keys. Maybe those not-placeholders should even only be rendered when the caret is nearby?
(Writing a sum or a lim without any bounds is somewhat reasonable after all.)
That way, after inserting an integral symbol, you can hit backspace to remove it again. You don't have to backspace the sub and sup.
Those symbols don't have sub and superscripts. They have "under/over" tokens. Notice how you cannot put your caret between the subscript and the symbol. Like $a|^{x}$ is impossible with a sum.
And also forced autocorrect: // - / fraction // - ^ exponent // - subscript // \sum turns into a (under sum ...) // \sum^ turns into a (over sum ...) // \sum_^ turns into a (under over sum ...)
An alternative somewhat consistent way of handling it would be
$\displaystyle \int_a^3 x^2 dx$
$\displaystyle 2y \big|_a^3$