tea.mathoverflow.net - Discussion Feed (Help test MathJax) Sun, 04 Nov 2018 13:07:50 -0800 http://mathoverflow.tqft.net/ Lussumo Vanilla 1.1.9 & Feed Publisher Cam McLeman comments on "Help test MathJax" (8779) http://mathoverflow.tqft.net/discussion/473/help-test-mathjax/?Focus=8779#Comment_8779 http://mathoverflow.tqft.net/discussion/473/help-test-mathjax/?Focus=8779#Comment_8779 Thu, 02 Sep 2010 13:23:23 -0700 Cam McLeman
Also, it's new that a lot of equations no longer fit in the margins of one answer window, right? ]]>
Harry Gindi comments on "Help test MathJax" (8775) http://mathoverflow.tqft.net/discussion/473/help-test-mathjax/?Focus=8775#Comment_8775 http://mathoverflow.tqft.net/discussion/473/help-test-mathjax/?Focus=8775#Comment_8775 Thu, 02 Sep 2010 10:54:40 -0700 Harry Gindi MathJax has some very strange bugs in preview. I haven't taken any screens, but let's just say that there are circumstances where it breaks it completely (on more than just math).

]]>
VA comments on "Help test MathJax" (8772) http://mathoverflow.tqft.net/discussion/473/help-test-mathjax/?Focus=8772#Comment_8772 http://mathoverflow.tqft.net/discussion/473/help-test-mathjax/?Focus=8772#Comment_8772 Thu, 02 Sep 2010 08:16:38 -0700 VA
As some may remember, I asked about the MO's implementation of the math preview way back, and Scott's reply was to the effect that "there is something in the MO code about this, go and investigate it yourself" (http://mathoverflow.net/questions/22141/how-do-i-see-latex-math-on-any-web-page-and-in-email/22219#22219).

Anyway, the approach I ended up using in gmailtex is this: split a long email (resp. post) into paragraphs, and typeset only the paragraphs which are changed on the last keystroke (usually, a single, relatively short paragraph).

What I gleaned from the MO's javascript, without understanding details, is that MO has a concept of Chunks, and the live preview is supposed to work with these Chunks separately, not remaking the whole post on each keystroke. So perhaps this functionality is already in the MO code, you just need to coordinate it with MathJax. ]]>
Anton Geraschenko comments on "Help test MathJax" (8568) http://mathoverflow.tqft.net/discussion/473/help-test-mathjax/?Focus=8568#Comment_8568 http://mathoverflow.tqft.net/discussion/473/help-test-mathjax/?Focus=8568#Comment_8568 Mon, 23 Aug 2010 14:48:41 -0700 Anton Geraschenko I've tweaked the live preview so you should now get MathML rendering properly and you should be able to get the MathJax context menu by right clicking.

]]>
Anton Geraschenko comments on "Help test MathJax" (8552) http://mathoverflow.tqft.net/discussion/473/help-test-mathjax/?Focus=8552#Comment_8552 http://mathoverflow.tqft.net/discussion/473/help-test-mathjax/?Focus=8552#Comment_8552 Sun, 22 Aug 2010 21:04:04 -0700 Anton Geraschenko Update

MathJax 1.0 is now out! I've been in touch with Davide, who has been extremely helpful. Faketestsite is now running MathJax "for real" ... if we were to switch now, that's how fast/slow and robust/buggy it would be. I think it looks very good, but I wanted to get in one last round of public testing/suggestions before pushing the changes to MO. Two things worth pointing out:

  1. (on MathML) Faketestsite will render math with HTML-CSS by default, but MathJax now allows you to change this to MathML by setting a cookie. Just right click on some math (except in the live preview because of how I've implemented it) and go to Settings > Math Renderer > MathML.
  2. (on speed) MathJax does not (yet) have an equation cache like jsMath does, so if the same equation shows up many times, it has to reprocess it every time. For browsing, it should be at least as fast as jsMath, but the live preview is slower than you might otherwise expect.

My guess is that if people have complaints, it will be about the live preview. We could also do the live preview in the same way that math.SE does it (you have to wait a few seconds for before any math renders), but I like the approach on faketestsite much better. It has MathJax work in the background on a hidden div, after which it copies the html into the actual preview div. The result is that the preview is less responsive than the current jsMath version, but I think it's quite usable. Since the html is copied from another div, you can't get the MathJax control panel by right clicking. It also messes up MathML for some reason. I've emailed Davide to ask if it's possible to fix that. I'll try to remember to post a banner at the top of the site if I'm tinkering.

Please head over to faketestsite and give it a try.

]]>
Andrew Stacey comments on "Help test MathJax" (7204) http://mathoverflow.tqft.net/discussion/473/help-test-mathjax/?Focus=7204#Comment_7204 http://mathoverflow.tqft.net/discussion/473/help-test-mathjax/?Focus=7204#Comment_7204 Mon, 19 Jul 2010 01:15:06 -0700 Andrew Stacey

I'd like Andrew Stac[e]y to be happy.

This sounds a worthy aim!

More seriously, can the fonts used by MathJax be configured? Could it use the STIX fonts?

In my experience, MathML is well supported by firefox. The issue regarding the bold fonts is annoying, but easily surmountable depending on how easy the script is to modify (I've no experience with javascript, and no particular desire to gain any!).

]]>
Anton Geraschenko comments on "Help test MathJax" (6752) http://mathoverflow.tqft.net/discussion/473/help-test-mathjax/?Focus=6752#Comment_6752 http://mathoverflow.tqft.net/discussion/473/help-test-mathjax/?Focus=6752#Comment_6752 Wed, 07 Jul 2010 22:36:55 -0700 Anton Geraschenko @VA: thanks for your detailed feedback. I tried explicitly loading those extensions, but I don't see any difference. In non-MML browsers, the fonts display correctly (as they did before), and in MML browsers, they still don't display correctly.

MathJax v1.0 is supposed to be optimized for speed. If it's still slower than jsMath, then I agree we should wait to switch.

If MML support in browsers is really as dodgy as you've described, then we should certainly use HTML-CSS by default. I'll look into the possibility of setting a preference cookie to use MML ... I'd like Andrew Stacey to be happy.

I got an email from Davide Cervone (the hero behind jsMath and, as I understand it, the driving force behind MathJax). He says that after MathJax 1.0 is out, he's willing to help us better integrate MathJax into MO. Woohoo! Between bugs being fixed in the latest svn updates and his help with implementation, I expect we'll be able to iron out most problems.

(Edit: corrected my misspelling of Andrew's name ... sorry.)

]]>
VA comments on "Help test MathJax" (6612) http://mathoverflow.tqft.net/discussion/473/help-test-mathjax/?Focus=6612#Comment_6612 http://mathoverflow.tqft.net/discussion/473/help-test-mathjax/?Focus=6612#Comment_6612 Thu, 01 Jul 2010 13:03:26 -0700 VA
1. It does not seem to be any faster than HTML-CSS output. This reason alone should be enough.

2. The MathJax developers only guarantee a high-quality output for HTML-CSS, not for MathML, see these threads:

https://sourceforge.net/tracker/?func=detail&atid=1240827&aid=3001291&group_id=261188
https://sourceforge.net/tracker/?func=detail&atid=1240827&aid=3001307&group_id=261188

Essentially, the MathML output is only as good as the browser's implementation. Firefox is buggy, and other browsers are worse.

3. The infamous 9-year old Mozilla bug preventing correct display of \mathbb, \mathfrac, \mathcal characters. The only solution I know is to use CSS. But it depends on which fonts the user has on its machine (MathJax or STIX) and it is very non user friendly, so that defeats the whole purpose. MathJax is not going to be of much help here any time soon, cf. this discussion:

https://sourceforge.net/tracker/?func=detail&atid=1240827&aid=3001677&group_id=261188

So my advice is to set
jax: ["input/TeX","output/HTML-CSS"],
in config/MathJax.js

By the way, looking at the characters failed to be displayed in http://faketestsite.stackexchange.com/questions/92/maths-torture-test, I see that you probably did not load the extensions AMSmath and AMSsymbols in your config/MathJax.js

They must be loaded explicitly, for example:

extensions: ["tex2jax.js", "TeX/noErrors.js", "TeX/noUndefined.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],

Finally, I would not rush with switching to MathJax until after it is optimized for speed. Not having an equation cache yet may not be a big problem for MO, but in general MathJax seems to be significantly slower than jsMath. I understand this will be addressed later, for now the focus is on features. ]]>
Harald Hanche-Olsen comments on "Help test MathJax" (6500) http://mathoverflow.tqft.net/discussion/473/help-test-mathjax/?Focus=6500#Comment_6500 http://mathoverflow.tqft.net/discussion/473/help-test-mathjax/?Focus=6500#Comment_6500 Mon, 28 Jun 2010 21:14:11 -0700 Harald Hanche-Olsen @Harry: Yes, your pictures clearly show a problem, but Anton posted pictures just before yours, and I thought he was complaining about those. (Or did I misread his post? It's been edited, I don't know what it said when I responded.)

]]>
Harry Gindi comments on "Help test MathJax" (6474) http://mathoverflow.tqft.net/discussion/473/help-test-mathjax/?Focus=6474#Comment_6474 http://mathoverflow.tqft.net/discussion/473/help-test-mathjax/?Focus=6474#Comment_6474 Sun, 27 Jun 2010 20:55:06 -0700 Harry Gindi @Harald: I posted a picture of how it displays for me. It's rather clear that it is incorrect (half of the symbol is cut off).

]]>
Harald Hanche-Olsen comments on "Help test MathJax" (6473) http://mathoverflow.tqft.net/discussion/473/help-test-mathjax/?Focus=6473#Comment_6473 http://mathoverflow.tqft.net/discussion/473/help-test-mathjax/?Focus=6473#Comment_6473 Sun, 27 Jun 2010 20:34:54 -0700 Harald Hanche-Olsen I don't get it. Everybody seems to say \prod should be aligned on the baseline. But TeX surely centers it (and \sum too), and this looks right to me too.

]]>
José Figueroa comments on "Help test MathJax" (6467) http://mathoverflow.tqft.net/discussion/473/help-test-mathjax/?Focus=6467#Comment_6467 http://mathoverflow.tqft.net/discussion/473/help-test-mathjax/?Focus=6467#Comment_6467 Sun, 27 Jun 2010 11:15:28 -0700 José Figueroa OK -- thanks, I now got it. I had to reload twice more. I guess I'm not used to websites behaving so temperamentally :)

The \prod's seem correctly (Thanks to Harald for pointing this out!) aligned: along the centre and not along the baseline.

]]>
Anton Geraschenko comments on "Help test MathJax" (6463) http://mathoverflow.tqft.net/discussion/473/help-test-mathjax/?Focus=6463#Comment_6463 http://mathoverflow.tqft.net/discussion/473/help-test-mathjax/?Focus=6463#Comment_6463 Sun, 27 Jun 2010 09:53:12 -0700 Anton Geraschenko

When we were first setting up jsMath we had this problem too, and solved it by arbitrarily permuting the order we loaded various jsMath libraries in.

I think it was basically that we had to introduce some delay between when we loaded something and when we called it, because it would try to load asynchronously and end up stepping on its own toes. In this case there's only one script being loaded, and it's already being loaded after all the content is up, so I don't know what to do about it. As a hack, I could try something like setting a timer which attempts to process the page again after half a second.

I could also try messing around with this test page, which never seems to have that problem. But the math not processing happens pretty rarely for me. I don't have a way to intentionally reproduce it, which makes debugging tough.

]]>
Scott Morrison comments on "Help test MathJax" (6460) http://mathoverflow.tqft.net/discussion/473/help-test-mathjax/?Focus=6460#Comment_6460 http://mathoverflow.tqft.net/discussion/473/help-test-mathjax/?Focus=6460#Comment_6460 Sun, 27 Jun 2010 09:10:58 -0700 Scott Morrison @figueroa, others (me too!) have had to click reload a few times before it renders. I'm not sure why, or how to fix this. When we were first setting up jsMath we had this problem too, and solved it by arbitrarily permuting the order we loaded various jsMath libraries in.

]]>
José Figueroa comments on "Help test MathJax" (6457) http://mathoverflow.tqft.net/discussion/473/help-test-mathjax/?Focus=6457#Comment_6457 http://mathoverflow.tqft.net/discussion/473/help-test-mathjax/?Focus=6457#Comment_6457 Sun, 27 Jun 2010 05:41:46 -0700 José Figueroa I'm using the latest (5.0.375.86, as of this writing) version of Google Chrome on the latest version (10.6.4, as of this writing) of Mac OS X and I don't get any of the maths in http://faketestsite.stackexchange.com/questions/90/stress-test-using-mathjax/91#91 to render! All I see is the latex code. What am I missing?

]]>
Harry Gindi comments on "Help test MathJax" (6443) http://mathoverflow.tqft.net/discussion/473/help-test-mathjax/?Focus=6443#Comment_6443 http://mathoverflow.tqft.net/discussion/473/help-test-mathjax/?Focus=6443#Comment_6443 Fri, 25 Jun 2010 17:57:40 -0700 Harry Gindi Well, at least for text within a question or answer, once you gain the ability to edit at 2000 rep, it's easy to just copy the source. However, this does not work for comments.

]]>
Ilya Grigoriev comments on "Help test MathJax" (6442) http://mathoverflow.tqft.net/discussion/473/help-test-mathjax/?Focus=6442#Comment_6442 http://mathoverflow.tqft.net/discussion/473/help-test-mathjax/?Focus=6442#Comment_6442 Fri, 25 Jun 2010 17:37:54 -0700 Ilya Grigoriev Ilya Grigoriev comments on "Help test MathJax" (6441) http://mathoverflow.tqft.net/discussion/473/help-test-mathjax/?Focus=6441#Comment_6441 http://mathoverflow.tqft.net/discussion/473/help-test-mathjax/?Focus=6441#Comment_6441 Fri, 25 Jun 2010 17:36:04 -0700 Ilya Grigoriev
[edit] Actually, Opera on a fast computer freezes just as badly at
http://faketestsite.stackexchange.com/questions/92/maths-torture-test ]]>
Andrew Stacey comments on "Help test MathJax" (6439) http://mathoverflow.tqft.net/discussion/473/help-test-mathjax/?Focus=6439#Comment_6439 http://mathoverflow.tqft.net/discussion/473/help-test-mathjax/?Focus=6439#Comment_6439 Fri, 25 Jun 2010 11:04:58 -0700 Andrew Stacey Bold in mathematics produced by itex uses the mathvariant to render as bold but it doesn't display correctly on firefox without the CSS tweaks. There's a mozilla bug number (which is in the CSS that I posted) that deals with it. As this is something I just imported from the nLab to the nForum, I don't actually know much about it beyond that.

Regarding the fonts and VA's CSS, that would only work if you have the fonts already downloaded. Does MathJax do the same font stuff as jsMath? If so, it might not know that it needs to send MathJax_XYZ because the need is expressed in the CSS and not in what MathJax looks at. Try installing the fonts on your computer and having another look.

If that works, you could try using the @font-face directive to make the fonts available to browsers that support that, or simply say that everyone has to download these fonts to use MO!

]]>
Harry Gindi comments on "Help test MathJax" (6438) http://mathoverflow.tqft.net/discussion/473/help-test-mathjax/?Focus=6438#Comment_6438 http://mathoverflow.tqft.net/discussion/473/help-test-mathjax/?Focus=6438#Comment_6438 Fri, 25 Jun 2010 10:59:37 -0700 Harry Gindi Here's what I'm getting in Google chrome:

]]>
Anton Geraschenko comments on "Help test MathJax" (6437) http://mathoverflow.tqft.net/discussion/473/help-test-mathjax/?Focus=6437#Comment_6437 http://mathoverflow.tqft.net/discussion/473/help-test-mathjax/?Focus=6437#Comment_6437 Fri, 25 Jun 2010 09:55:13 -0700 Anton Geraschenko Can somebody say some more about \prod's please? They render below the baseline for me, but they look correct:
chromejax : produced by MathJax in Chrome
jsmath : produced by jsMath in Chrome
texprod : produced by LaTeX

@Andrew: can you explain exactly what problem the CSS you posted solves? Don't bold and italics work just fine already? I tried adding the CSS VA listed in this answer:

[mathvariant="double-struck"] {font-family: MathJax_AMS; } 
[mathvariant="script"] {font-family: MathJax_Script; } 
[mathvariant="fraktur"] {font-family: MathJax_Fraktur;} 
[mathvariant="-tex-caligraphic"] {font-family: MathJax_Caligraphic; } 
[mathvariant="bold-script"] {font-family: MathJax_Script; font-weight: bold;} 
[mathvariant="bold-fraktur"] {font-family: MathJax_Fraktur; font-weight: bold;} 
[mathvariant="monospace"] {font-family: monospace} 

it looks like it's supposed to get things like fraktur working, but it looks the same for me (yes, I cleared my cache). Does MathML mathfrak look right for anybody right now? Changing my font.mathfont-family variable in about:config didn't help.

Edit: there's a discussion about this on the MathJax Help forum, but as far as I can tell, it hasn't really been resolved.

]]>
Harry Gindi comments on "Help test MathJax" (6435) http://mathoverflow.tqft.net/discussion/473/help-test-mathjax/?Focus=6435#Comment_6435 http://mathoverflow.tqft.net/discussion/473/help-test-mathjax/?Focus=6435#Comment_6435 Fri, 25 Jun 2010 09:29:17 -0700 Harry Gindi I just tested it in Safari on a computer in the department. It now appears to be working fine for some strange reason.

]]>
Harry Gindi comments on "Help test MathJax" (6426) http://mathoverflow.tqft.net/discussion/473/help-test-mathjax/?Focus=6426#Comment_6426 http://mathoverflow.tqft.net/discussion/473/help-test-mathjax/?Focus=6426#Comment_6426 Fri, 25 Jun 2010 02:37:11 -0700 Harry Gindi No, I've been testing with firefox and chrome. Testing with opera wouldn't really give you important information!

More bugs!

Using Andrew's giant list of symbols (granted, many of them didn't render at all), I saw that all of the oversized symbols (direct sum, product, bigcup, bigcap, all integrals) are getting mangled in chrome (which is not receiving mathml from the software).

If someone has access to a macintosh computer, would you mind checking to see if the \prod gets sunk below the bottom of the line at this post?

]]>
Andrew Stacey comments on "Help test MathJax" (6425) http://mathoverflow.tqft.net/discussion/473/help-test-mathjax/?Focus=6425#Comment_6425 http://mathoverflow.tqft.net/discussion/473/help-test-mathjax/?Focus=6425#Comment_6425 Fri, 25 Jun 2010 01:46:02 -0700 Andrew Stacey Harry, when you were testing MathML were you using Opera? In which case, the correct solution is to correctly recognise that Opera doesn't cope with MathML and serve it the alternative rather than disable MathML for browsers that can cope with it.

]]>
Andrew Stacey comments on "Help test MathJax" (6424) http://mathoverflow.tqft.net/discussion/473/help-test-mathjax/?Focus=6424#Comment_6424 http://mathoverflow.tqft.net/discussion/473/help-test-mathjax/?Focus=6424#Comment_6424 Fri, 25 Jun 2010 01:44:12 -0700 Andrew Stacey I've thrown the iTeX torture test at it and I think I know why the fonts aren't rendering correctly. More details over at the fake test site.

]]>
Harry Gindi comments on "Help test MathJax" (6423) http://mathoverflow.tqft.net/discussion/473/help-test-mathjax/?Focus=6423#Comment_6423 http://mathoverflow.tqft.net/discussion/473/help-test-mathjax/?Focus=6423#Comment_6423 Fri, 25 Jun 2010 00:59:08 -0700 Harry Gindi Found two bugs:

To get math to render, you have to reload the page in google chrome.

When not using mathml, the \prod symbol renders below the line.

However, at the moment, non-mathml output is definitely the nicest looking.

]]>
Harry Gindi comments on "Help test MathJax" (6422) http://mathoverflow.tqft.net/discussion/473/help-test-mathjax/?Focus=6422#Comment_6422 http://mathoverflow.tqft.net/discussion/473/help-test-mathjax/?Focus=6422#Comment_6422 Fri, 25 Jun 2010 00:53:55 -0700 Harry Gindi Okay, I installed Google Chrome with the express purpose of testing out the non-mathml rendering.

A.) Fraktur renders fine

B.) It is just as fast if not faster than mathml rendering (significantly faster than jsMath)

C.) It looks better

Proposal: Anton, could you totally disable mathml rendering until the bugs are worked out, then just put mathJax on the main MO site? The output is faster and nicer (even non-mathml) than the jsMath output.

]]>
Andrew Stacey comments on "Help test MathJax" (6421) http://mathoverflow.tqft.net/discussion/473/help-test-mathjax/?Focus=6421#Comment_6421 http://mathoverflow.tqft.net/discussion/473/help-test-mathjax/?Focus=6421#Comment_6421 Fri, 25 Jun 2010 00:36:00 -0700 Andrew Stacey MathML capable browsers:

  • Firefox and its derivatives, so you need to look for 'Gecko' in the user agent except that WebKit also reports 'Gecko'. There's some punctuation that follows the 'Gecko' in proper Gecko browsers (don't remember it off the top of my head) or you can exclude anything that matches 'webkit'
  • IE with the MathPlayer plugin installed (do a regexp on 'mathplayer' in the user agent (case insensitive or look up the capitilisation))
  • Amaya

You will need a decent unicode font, such as the STIX fonts. Exactly what's going on with the alphabets depends a bit on which glyphs are being chosen (I haven't looked yet).

]]>
Anton Geraschenko comments on "Help test MathJax" (6420) http://mathoverflow.tqft.net/discussion/473/help-test-mathjax/?Focus=6420#Comment_6420 http://mathoverflow.tqft.net/discussion/473/help-test-mathjax/?Focus=6420#Comment_6420 Thu, 24 Jun 2010 23:14:21 -0700 Anton Geraschenko

Edit: It must be an issue with mathjax (I just tested it myself), since the STIX fonts work fine on the nLab with fraktur.

hmmm ...

Also, by the way, is there any way for us to turn of mathml serving? Opera claims to support MML, but the support is awful (and it looks better the other way).

I think the answer is currently no, but I did email the MathJax team to tell them that I'm really looking forward to the addition of a control panel (similar to the jsMath control panel) which would allow users to set such preferences.

]]>
Harry Gindi comments on "Help test MathJax" (6419) http://mathoverflow.tqft.net/discussion/473/help-test-mathjax/?Focus=6419#Comment_6419 http://mathoverflow.tqft.net/discussion/473/help-test-mathjax/?Focus=6419#Comment_6419 Thu, 24 Jun 2010 22:32:20 -0700 Harry Gindi The STIX project released v 1.0 of their fonts (the ones that were previously going around were incomplete beta versions).

Edit: It must be an issue with mathjax (I just tested it myself), since the STIX fonts work fine on the nLab with fraktur.

Also, by the way, is there any way for us to turn of mathml serving? Opera claims to support MML, but the support is awful (and it looks better the other way).

]]>
Anton Geraschenko comments on "Help test MathJax" (6418) http://mathoverflow.tqft.net/discussion/473/help-test-mathjax/?Focus=6418#Comment_6418 http://mathoverflow.tqft.net/discussion/473/help-test-mathjax/?Focus=6418#Comment_6418 Thu, 24 Jun 2010 21:54:03 -0700 Anton Geraschenko MathJax 1.0 is due to be released very soon (in a week or so?). I think there are good reasons for switching from jsMath to MathJax when that happens. MathJax seems to be more stable and have more uniform behavior across browsers. Also, it allows for the option of converting to MathML in browsers that can handle it.

I've implemented MathJax on faketestsite and I invite you to go try it out.

  • It's configured to try to convert to MathML, but to use HTML-CSS if the browser doesn't support MathML (what browsers aside from Firefox support MML?).
  • All macros that work on MO should work on faketestsite.
  • The live preview should work.
  • Math in the comments should work properly.

One issue I've encountered is that when I use Firefox and get MathML output, it looks like I don't have enough fonts installed. For example, \mathfrak and \mathcal both come out as upright roman font. Does anybody know how to solve this?

It's likely to feel a bit slow right now. There are two reasons for this. One is that I'm hosting MathJax on my home computer, so fetching the scripts and fonts may be slow. The other is that MathJax is still being optimized for speed. Both of these will be resolved by the time we start using MathJax on MO.

]]>