From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?ISO-8859-1?Q?Jan_B=F6cker?= Subject: Re: MathJax is now the default for HTML math Date: Sun, 15 Aug 2010 00:16:48 +0200 Message-ID: <4C6715D0.3060508@jboecker.de> References: <63B79D2B-9483-481F-B7AB-88BEA753D5C8@gmail.com> <4C66F076.10505@jboecker.de> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------030107040103070405000700" Return-path: Received: from [140.186.70.92] (port=43911 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OkP2F-0004vM-Ns for emacs-orgmode@gnu.org; Sat, 14 Aug 2010 18:17:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OkP2E-0003ti-Ix for emacs-orgmode@gnu.org; Sat, 14 Aug 2010 18:17:03 -0400 Received: from smtp01.worldserver.net ([217.13.200.36]:49465) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OkP2E-0003sh-5w for emacs-orgmode@gnu.org; Sat, 14 Aug 2010 18:17:02 -0400 In-Reply-To: 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: Carsten Dominik Cc: detlef.steuer@gmx.de, emacs-orgmode List This is a multi-part message in MIME format. --------------030107040103070405000700 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On 08/14/2010 10:59 PM, Carsten Dominik wrote: > Hi Jan, > > can you expand a bit on why this is interesting to do? What are the > advantages? > > Thanks! > > - Carsten Advantages are: - The user is not required to have JavaScript enabled - In some cases, there is a speed advantage, because there is no rendering stage. This is especially noticeable on high-latency connections when the MathJax files are not already cached. - Fonts can be embedded into the HTML file itself, so it feels more 'document-like' (no need to move additional files around) - The approach might be interesting for HTML email, because it would require neither JavaScript nor attachments Of course, there are disadvantages too: - No interactive MathJax features (zoom, view source, switch rendering backend) - no fallback to image fonts (although AFAIK, all current versions of major browsers support CSS3 custom fonts) - slightly different spacing and font sizes in non-Firefox browsers - if fonts are embedded within the HTML file: * IE will not show the correct font (but in my test the formatting was still correct and readable) * The HTML file will be larger (my small example grew by 436 KB). Bandwidth is wasted because the fonts are base64-encoded. I would not recommend this for regular publishing on the web. As long as JavaScript is enabled (as it is in most cases), the disadvantages outweigh the advantages. It might come in handy if you want to send someone a single file (although you can always use PDF for that) or if you want to provide an alternative for users who have JavaScript disabled. Ideally, there would be some sort of graceful degradation, so that users without JavaScript see the non-JS version, but if JavaScript is enabled, the math gets re-rendered and all MathJax features are available. I have not explored the feasibility of that. On 08/14/2010 10:39 PM, Detlef Steuer wrote: > Could you post the org file to give dummies like me a head start? > Especially the serializing back to HTML? How is it done? I have attached the (very simple) example org file to this email. The first example is the result of exporting this file with C-c C-e h (like Carsten said, it Just Works). The second example is the result of processing the first one with a xulrunner application I hacked together (which is independent of emacs). I'll try to get that application into a publishable form tomorrow (remove hard-coded values, make embedding fonts into the HTML file optional, etc). My aim is to provide an elisp function to be called from an export hook which makes the appropriate call to create the non-JS version. -- Jan --------------030107040103070405000700 Content-Type: text/plain; name="mathjaxtest.org" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="mathjaxtest.org" * Testing MathJax: $2^4 = 16 \le 16$ \( exp(z) = \sum_{k=0}^\infty \frac{z^k}{k!} \) --------------030107040103070405000700 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --------------030107040103070405000700--