I had not played with latex fragments recently (= ever since MathJax became the default back in August 2010 and probably from some time before that), so based on my previous dvipng-based knowledge, I made an ill-informed comment on IRC. Nicolas Goaziou corrected me and pointed out that the default is now MathJax, so I went off and tried things out. I tried with MathJax from the orgmode site, but I also downloaded the stable 1.0.x version (and the new otf fonts) and the beta 1.1 version (which already includes the new otf fonts). I tried it on the following org file (commenting/uncommenting options lines for the various runs: --8<---------------cut here---------------start------------->8--- #+OPTIONS: LaTeX:t ##+OPTIONS: LaTeX:dvipng ##+MATHJAX: align:"left" mathml:t ##+MATHJAX: align:"left" mathml:t path:"/home/nick/lib/mathjax/MathJax/MathJax.js" #+MATHJAX: align:"left" mathml:t path:"/home/nick/lib/mathjax/mathjax-MathJax-20e0cf6/MathJax.js" * Euler \[ \int_0^\infty e^{-x^2} dx = {{\sqrt{\pi}} \over {2}} \] \[ e^{i\pi} = -1 \] --8<---------------cut here---------------end--------------->8--- I've put the results of two runs, one with MathJax and one with dvipng, up at http://free.linux.hp.com/~nick/euler/euler-mj.html http://free.linux.hp.com/~nick/euler/euler-dvipng.html The different versions of MathJax all looked the same. The one I put up is the one that gets MathJax from the publicly available orgmode site, so if you just want to look at it, you don't have to install anything. There are two obvious differences: o the MathJax version has the equations centered, whereas the dvipng version has them flush left. I have not investigated why that is. o the dvipng version looks much better to my eye than the MathJax version. Of course, MathJax has advantages: it's scalable, so when you go to higher magnifications, you don't get the jaggies that the png images suffer. But I was wondering whether there is any way I can get prettier output from MathJax. Thanks, Nick

[following up on my post...] One thing that should have helped is to set the mathml option to nil: --8<---------------cut here---------------start------------->8--- #+MATHJAX: align:"left" mathml:nil path:"/home/nick/lib/mathjax/mathjax-MathJax-20e0cf6/MathJax.js" --8<---------------cut here---------------end--------------->8--- That forces HTML-CSS output and from what I can see on the mathjax site, that should improve things - but it doesn't for me, so I'm still not out of the woods. Maybe MathJax doesn't know where to get the TeX fonts? Nick

Another advantage of MathJax: 1) It degrades nicely in browsers without MathML (all webkit browsers) 2) Equations are still copy-and-pasteable into Word, if you're into that sort of thing. > That forces HTML-CSS output and from what I can see on the mathjax site, > that should improve things - but it doesn't for me, so I'm still not out > of the woods. Maybe MathJax doesn't know where to get the TeX fonts? I thought MathJax used custom fonts, which is the bulk of the 100 MB installation, since each glyph is its own image. I could be wrong about this. -- Jeffrey Horn http://www.failuretorefrain.com/jeff/

```
On 03/08/2011 02:16 PM, Nick Dokos wrote:
> [following up on my post...]
>
> One thing that should have helped is to set the mathml option to nil:
>
> --8<---------------cut here---------------start------------->8---
> #+MATHJAX: align:"left" mathml:nil path:"/home/nick/lib/mathjax/mathjax-MathJax-20e0cf6/MathJax.js"
> --8<---------------cut here---------------end--------------->8---
>
> That forces HTML-CSS output and from what I can see on the mathjax site,
> that should improve things - but it doesn't for me, so I'm still not out
> of the woods. Maybe MathJax doesn't know where to get the TeX fonts?
Do the examples on mathjax.org look nice to you? And which browser
do you happen to be using for viewing?
```

Erik Iverson <eriki@ccbr.umn.edu> wrote: > On 03/08/2011 02:16 PM, Nick Dokos wrote: > > [following up on my post...] > > > > One thing that should have helped is to set the mathml option to nil: > > > > --8<---------------cut here---------------start------------->8--- > > #+MATHJAX: align:"left" mathml:nil path:"/home/nick/lib/mathjax/mathjax-MathJax-20e0cf6/MathJax.js" > > --8<---------------cut here---------------end--------------->8--- > > > > That forces HTML-CSS output and from what I can see on the mathjax site, > > that should improve things - but it doesn't for me, so I'm still not out > > of the woods. Maybe MathJax doesn't know where to get the TeX fonts? > > Do the examples on mathjax.org look nice to you? And which browser > do you happen to be using for viewing? > > Yes - the Cauchy integral formula (as well as the Gauss divergence theorem further down) on http://www.mathjax.org/demos/mathml-samples/ looks fine when HTML-CSS rendering is chosen. When MathML rendering is chosen, the integral sign is too small. That's what motivated the mathml:nil effort above, but it didn't pan out. But even in MathML rendering, the integral sign, even though small, looks better than the one I posted. I'm using firefox 3.6.14 on Ubuntu 10.10. Thanks, Nick

On Wed, Mar 9, 2011 at 07:43, Nick Dokos <nicholas.dokos@hp.com> wrote: > Erik Iverson <eriki@ccbr.umn.edu> wrote: >> On 03/08/2011 02:16 PM, Nick Dokos wrote: >> > [snip] >> > That forces HTML-CSS output and from what I can see on the mathjax site, >> > that should improve things - but it doesn't for me, so I'm still not out >> > of the woods. Maybe MathJax doesn't know where to get the TeX fonts? >> >> Do the examples on mathjax.org look nice to you? And which browser >> do you happen to be using for viewing? > > Yes - the Cauchy integral formula (as well as the Gauss divergence > theorem further down) on > > http://www.mathjax.org/demos/mathml-samples/ > > looks fine when HTML-CSS rendering is chosen. When MathML > rendering is chosen, the integral sign is too small. That's > what motivated the mathml:nil effort above, but it didn't pan > out. But even in MathML rendering, the integral sign, even though > small, looks better than the one I posted. > > I'm using firefox 3.6.14 on Ubuntu 10.10. FWIW, same here. Firefox 3.6.15 on Windows 7. Given that both pages specify the MathJax_Math font yet only mathjax.org actually looks like it uses it, you’re probably right about MathJax having trouble finding the fonts on yours. I tried a couple other browsers. IE8 aborts the script after an error on “Line 1, char 6” (I think that’s because of the nest of CDATA, HTML comments and JS comments), while Chrome seems to be using the right font. So I guess this is a Firefox thing. The FAQ mentions Firefox’s same-origin policy in the context of image fonts being used instead of web fonts.[1] Seems unlikely to be the culprit in this case though. *shrugs* Hope this helps narrow it down a little. Aankhen [1]: http://www.mathjax.org/resources/faqs/#image-fonts

```
Aankhen <aankhen@gmail.com> wrote:
> FWIW, same here. Firefox 3.6.15 on Windows 7. Given that both pages
> specify the MathJax_Math font yet only mathjax.org actually looks like
> it uses it, you’re probably right about MathJax having trouble finding
> the fonts on yours.
>
> I tried a couple other browsers. IE8 aborts the script after an error
> on “Line 1, char 6” (I think that’s because of the nest of CDATA, HTML
> comments and JS comments), while Chrome seems to be using the right
> font. So I guess this is a Firefox thing. The FAQ mentions Firefox’s
> same-origin policy in the context of image fonts being used instead of
> web fonts.[1] Seems unlikely to be the culprit in this case though.
> *shrugs*
>
> Hope this helps narrow it down a little.
>
> Aankhen
>
> [1]: http://www.mathjax.org/resources/faqs/#image-fonts
>
Thanks for this! I probably won't be able to try anything out in the
next few days, but I'll probably spend some time during the weekend
on this.
Thanks,
Nick
```