mathquill / mathquill

Easily type math in your webapp
http://mathquill.com
Mozilla Public License 2.0
2.67k stars 708 forks source link

When User tries to type 5^2 and unknowingly taps power button twice from keyboard in android app then the latex code output is given as 5^{^2} instead of 5^2 or 5{^2} #930

Open sirish2094 opened 3 years ago

sirish2094 commented 3 years ago

There is no way to control user input inside app and when the user taps the power button twice or thrice unknowingly using custom math keyboard of android app which is used to type math symbols in latex editor and display in it . In the image it is displayed as 5^2 and b^3 which is right but the latex code of it which is sent to backend is 5^{^2}, b^{^{^3}} wrong and cannot be handled for all the scenarios. The expected latex code output is 5^2 or 5{^2} , b^3 or b{^3} Mathkeycareterror png

Any quick suggestion or Answer would help thanks.

sashaalesin commented 3 years ago

Hey! Try adding option supSubsRequireOperand: true to config file. http://docs.mathquill.com/en/latest/Config/#supsubsrequireoperand