Skip to content
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

MathML generation error involving sin^2 #142

Closed
NSoiffer opened this issue Feb 18, 2019 · 3 comments
Closed

MathML generation error involving sin^2 #142

NSoiffer opened this issue Feb 18, 2019 · 3 comments
Assignees

Comments

@NSoiffer
Copy link
Collaborator

Description

$text('mathML') returns incorrect MathML for \sin ^2\left(x\right). It returns
<mrow><msup><mo>sin</mo><mn>2</mn></msup><mrow><mo>(</mo><mi>x</mi><mo>)</mo></mrow></mrow>

Steps to Reproduce

I have attached a file that reproduces the problem:
sinbug.zip

Unzip this to get an HTML file (can't attach HTML files directly) and that will show the error. This is a clone of examples/basic/index.html and the file references are relative to that location.

@arnog
Copy link
Owner

arnog commented Feb 18, 2019

What mathML do you expect? This appears to be valid mathML and it displays correctly in Safari.

screen shot 2019-02-17 at 6 42 29 pm

@NSoiffer
Copy link
Collaborator Author

That is indeed the correct MathML, but if you type sin^2 (x) ('space' to get out of exponent), you see different MathML:
<mrow><mo extid="phcusk">sin</mo><mo> &ApplyFunction; </mo><mrow><mo extid="phcuso">(</mo><mi extid="phcusm">x</mi><mo extid="phcuso">)</mo></mrow></mrow>
(apologies, I apparently pasted the correct in the initial bug report). Notice that there is no msup.

If you have trouble reproducing it, open the attached file in the initial bug report -- perhaps one of the config settings is causing the bug.

@arnog arnog self-assigned this Feb 18, 2019
@arnog
Copy link
Owner

arnog commented Feb 18, 2019

OK, got it. This happens only when typing the formula, not if pasting it.

@arnog arnog closed this as completed in 3738b00 Feb 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants