From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Davison Subject: Re: MathJax - use Tex/LaTeX/MathML in HTML pages Date: Mon, 02 Aug 2010 11:57:39 -0400 Message-ID: <87hbjdj9cc.fsf@stats.ox.ac.uk> References: <87ocdltmzo.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from [140.186.70.92] (port=47495 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OfxOa-0007JT-FS for emacs-orgmode@gnu.org; Mon, 02 Aug 2010 11:57:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OfxOZ-0006yI-4M for emacs-orgmode@gnu.org; Mon, 02 Aug 2010 11:57:44 -0400 Received: from markov.stats.ox.ac.uk ([163.1.210.1]:54054) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OfxOY-0006xw-Rk for emacs-orgmode@gnu.org; Mon, 02 Aug 2010 11:57:43 -0400 In-Reply-To: <87ocdltmzo.fsf@gnu.org> (Bastien's message of "Mon, 02 Aug 2010 10:52:43 +0200") 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: Bastien Cc: emacs-orgmode@gnu.org Hi Bastien, Bastien writes: > Hi all, > > I just discovered and tested MathJax: > > http://www.mathjax.org > > This is quite straightforward: unpack MathJax on your server (together > with the fonts zip) and it will display inline LaTeX maths in a webpage. > > I thought it could be interesting to have an option for people who want > to use it instead of the current LaTeX fragments mechanism. It's quite convenient already (see below), so what exactly would the option involve? Can the javascript and fonts be located remotely? I.e. can org host them like it hosts org-info.js? (I just tried that and failed) I wasn't aware of mathjax but I've just had a quick play. Some notes - MathJax appears to be the successor of jsMath (same developer) - Darlan Cavalcante has written a Worg article[1] on using jsMath with org - Basically, to use jsMath all you need is #+options: latex:verbatim #+style: - To convert this to MathJax, all you need to change is the path: /path/to/mathjax/MathJax.js - I found that a document with lots of maths rendered visually the same in mathjax as jsMath - Mathjax was considerably slower to render the maths. (I think that under the hood it converts to mathML which jsMath does not do (?)) - Whereas google-chrome did not work with jsMath for me, it worked fine with MathJax. This is nice because google-chrome produces a clean pdf (firefox adds the file path at the top of the document) - We can put the latex in a src block using #+begin_src latex :results raw :exports results As I said the other day[2], one reason I am excited about these technologies is that we can produce a pdf with pretty source code fontification via htmlize (rather than ugly[3] latex listings output) and genuine mathematical fonts rather than ugly dvipng images. I do this via CUPS print to file under linux, which allows the web browser to produce a .ps or .pdf. I'd be interested to know how we can make this a more "genuine" org export path. Dan > > Anyone already using MathJax? Footnotes: [1] http://orgmode.org/worg/org-tutorials/org-jsmath.php [2] http://thread.gmane.org/gmane.emacs.orgmode/28150 [3] No one has replied to my post the other day, so I'll be more contentious. Can anyone demonstrate how to make source code look anywhere near as nice using listings in latex as with htmlize.el?