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

working in html but not in svg #604

Closed
kenjiejima opened this issue Oct 9, 2013 · 6 comments

Comments

Projects
None yet
3 participants
@kenjiejima
Copy link

commented Oct 9, 2013

Hello everybody,

I've found an issue that may be a bug. I made a page that reproduces the bug at:

http://emilics.com/media/mathjaxtest/testformula1.html

Please see the html source for the actual math formulae. The output is SVG. I'm using MathJax 2.2.8 on my actual service but the page above uses 2.2-latest from your CDN.

On my browser (chromium 28, firefox 24, both on ubuntu 12.04) it gives me a red [Math Processing Error]. When I right click on that, select "Show Math As" and "Error Message", it gives me:

Error: g is undefined

Now, when I change the config from TeX-AMS-MML_SVG-full to TeX-AMS_HTML-full then it works like this:

http://emilics.com/media/mathjaxtest/testformula2.html

Nice. So it might be an error that only occurs in the SVG output settings. When I surround the formulae with an array environment then it works in SVG mode like this:

http://emilics.com/media/mathjaxtest/testformula3.html

In my formula, I'm using \phantom{ } to align formulae and I know that isn't the best way for alignment. I changed the formula for myself and that works but I wanted to let you know about this issue.

Best regards,

-- Kenji

@dpvc

This comment has been minimized.

Copy link
Member

commented Oct 9, 2013

It's a bug (in the SVG processing of multi-line equations). Thanks for reporting it. I'll look into it.

@dpvc

This comment has been minimized.

Copy link
Member

commented Oct 10, 2013

It turns out that the problem was with the implementation of \mathchoice (which is used by \pmod), which wasn't keeping some of the data needed by the line-breaking algorithm. I have fixed it in the issue604 branch of my fork of MathJax.

@kenjiejima

This comment has been minimized.

Copy link
Author

commented Oct 10, 2013

Thanks a lot for the really fast response and fix. I downloaded the branch and verified that it works. I think I'll use the issue604 branch since my site accepts user formulae and we use the SVG output. One less bug one more smile.

-- Kenji

@dpvc

This comment has been minimized.

Copy link
Member

commented Oct 10, 2013

The issue604 branch is based off the current develop branch, which includes lots of other things that are not fully debugged yet, so I don't recommend switching to it for a production site at the moment. The change was small, and only involved one file, so I would suggest that you just copy the unpacked/extensions/TeX/mathchoice.js file to your extensions folder for the version 2.2 branch instead. If you are using the compressed version, you can still put the uncompressed file in the extensions/TeX folder for now. When v2.3 comes out, you will need to remove that file before pulling the update.

@fred-wang

This comment has been minimized.

Copy link
Contributor

commented Oct 10, 2013

Looks good to me.

=> Ready For Release

@fred-wang

This comment has been minimized.

Copy link
Contributor

commented Oct 11, 2013

=> Merged

@ghost ghost assigned dpvc Oct 11, 2013

@fred-wang fred-wang closed this Oct 11, 2013

@dpvc dpvc removed their assignment Jul 6, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.