emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* latex fragments, dvipng and mathjax
@ 2011-03-08 18:59 Nick Dokos
  2011-03-08 20:16 ` Nick Dokos
  0 siblings, 1 reply; 7+ messages in thread
From: Nick Dokos @ 2011-03-08 18:59 UTC (permalink / raw)
  To: emacs-orgmode; +Cc: nicholas.dokos

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-03-09 15:56 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-08 18:59 latex fragments, dvipng and mathjax Nick Dokos
2011-03-08 20:16 ` Nick Dokos
2011-03-08 22:56   ` Jeff Horn
2011-03-08 23:58   ` Erik Iverson
2011-03-09  2:13     ` Nick Dokos
2011-03-09  6:55       ` Aankhen
2011-03-09 15:55         ` Nick Dokos

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).