From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?=C5=81ukasz?= Stelmach Subject: [PATCH] displaymath environment and MathJax Date: Tue, 07 Dec 2010 18:42:47 +0100 Message-ID: <87bp4xscmg.fsf%lukasz.stelmach@iem.pw.edu.pl> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from [140.186.70.92] (port=51923 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PQ1ZC-00017d-Mj for emacs-orgmode@gnu.org; Tue, 07 Dec 2010 12:43:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PQ1ZB-0001Tm-Jh for emacs-orgmode@gnu.org; Tue, 07 Dec 2010 12:43:06 -0500 Received: from lo.gmane.org ([80.91.229.12]:44631) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PQ1ZB-0001Th-8Y for emacs-orgmode@gnu.org; Tue, 07 Dec 2010 12:43:05 -0500 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PQ1Z7-0008KJ-9Z for emacs-orgmode@gnu.org; Tue, 07 Dec 2010 18:43:01 +0100 Received: from dasa3.iem.pw.edu.pl ([194.29.147.110]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 07 Dec 2010 18:43:01 +0100 Received: from lukasz.stelmach by dasa3.iem.pw.edu.pl with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 07 Dec 2010 18:43:01 +0100 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 Greetings All. The following patch makes MathJax consider \begin{displaymath} and \end{displaymath} as math environmetn boundaries. For someone who, like me, keeps "The not so short introduction to LaTeX2e" alway around, the displaymath environment is the default way to introduce a block of math. In fact '\[' and '\]' are also mentioned there but the environment is used in every single example so the patch minimizes the surprise. --8<---------------cut here---------------start------------->8--- diff --git a/lisp/org-html.el b/lisp/org-html.el index d1fe06d..2380c12 100644 --- a/lisp/org-html.el +++ b/lisp/org-html.el @@ -290,7 +290,7 @@ You can also customize this for each buffer, using something like \"TeX/noUndefined.js\"], tex2jax: { inlineMath: [ [\"\\\\(\",\"\\\\)\"] ], - displayMath: [ ['$$','$$'], [\"\\\\[\",\"\\\\]\"] ], + displayMath: [ ['$$','$$'], [\"\\\\[\",\"\\\\]\"], [\"\\\\begin{displaymath}\",\"\\\\end{displaymath}\"] ], skipTags: [\"script\",\"noscript\",\"style\",\"textarea\",\"pre\",\"code\"], ignoreClass: \"tex2jax_ignore\", processEscapes: false, --8<---------------cut here---------------end--------------->8--- -- Miłego dnia, Łukasz Stelmach