New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Weird LaTeX representation of sin^2 x #2899
Comments
The difference is that in your first expression you have extra parenthesis math.parse('(sin(x))^2').toTex()
"{\\left(\\sin\\left( x\\right)\\right)}^{2}"
math.parse('(sin(x))^2').toTex({ parenthesis: 'auto' }) // default is 'keep'
"{\\sin\\left( x\\right)}^{2}" Documentation: https://mathjs.org/docs/expressions/customization.html#custom-html-latex-and-string-output |
But I think the original report needs some clarification: @nickkolok was your primary concern that the "usual" mathematical notation for the square of |
I'll close this issue now due to lack of response. Please reopen if needed. |
I'd like to make a vote for leaving this open, because it is true that the usual way to write the square of sin x in mathematical notation is sin^2 x rather than the actually systematic (sin x)^2. If mathjs is striving to match mathematical practice (not sure if that's always the case) then it should detect this situation and convert to sin^2 x notation. |
Ok I'll reopen the issue. So what we can improve here in |
Describe the bug
LaTeX representation of sin^2 x depends on the way how the squared sinus was got.
To Reproduce
The text was updated successfully, but these errors were encountered: