emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] latex fragments, dvipng and mathjax


From: Nick Dokos
Subject: [O] latex fragments, dvipng and mathjax
Date: Tue, 08 Mar 2011 13:59:12 -0500

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]