From mboxrd@z Thu Jan 1 00:00:00 1970
From: Nick Dokos
Subject: latex fragments, dvipng and mathjax
Date: Tue, 08 Mar 2011 13:59:12 -0500
Message-ID: <3941.1299610752@alphaville.usa.hp.com>
Reply-To: nicholas.dokos@hp.com
Return-path:
Received: from [140.186.70.92] (port=36778 helo=eggs.gnu.org)
by lists.gnu.org with esmtp (Exim 4.43) id 1Px27o-0006xP-6S
for emacs-orgmode@gnu.org; Tue, 08 Mar 2011 13:59:17 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
(envelope-from ) id 1Px27n-0006vH-7i
for emacs-orgmode@gnu.org; Tue, 08 Mar 2011 13:59:16 -0500
Received: from g1t0028.austin.hp.com ([15.216.28.35]:13624)
by eggs.gnu.org with esmtp (Exim 4.71)
(envelope-from ) id 1Px27n-0006ud-1m
for emacs-orgmode@gnu.org; Tue, 08 Mar 2011 13:59:15 -0500
Received: from g1t0039.austin.hp.com (g1t0039.austin.hp.com [16.236.32.45])
by g1t0028.austin.hp.com (Postfix) with ESMTP id 1DA561C054
for ; Tue, 8 Mar 2011 18:59:13 +0000 (UTC)
List-Id: "General discussions about Org-mode."
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org
Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org
To: emacs-orgmode@gnu.org
Cc: nicholas.dokos@hp.com
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