From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: [PATCH] displaymath environment and MathJax Date: Thu, 9 Dec 2010 12:04:37 +0100 Message-ID: <27FE1DDE-29FB-4EB9-9502-8BCD9475CCA3@gmail.com> References: <87bp4xscmg.fsf%lukasz.stelmach@iem.pw.edu.pl> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=UTF-8; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=44948 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PQeIm-0005UO-N6 for emacs-orgmode@gnu.org; Thu, 09 Dec 2010 06:04:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PQeIl-0007vL-8o for emacs-orgmode@gnu.org; Thu, 09 Dec 2010 06:04:44 -0500 Received: from mail-ey0-f177.google.com ([209.85.215.177]:33787) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PQeIl-0007v7-3Z for emacs-orgmode@gnu.org; Thu, 09 Dec 2010 06:04:43 -0500 Received: by eyd9 with SMTP id 9so1915458eyd.36 for ; Thu, 09 Dec 2010 03:04:42 -0800 (PST) In-Reply-To: <87bp4xscmg.fsf%lukasz.stelmach@iem.pw.edu.pl> 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: =?UTF-8?Q?=C5=81ukasz_Stelmach?= Cc: emacs-orgmode@gnu.org Hi Lukasz, this looks like a MathJax bug to me. MathJax does understand equation and many other environments - so I do not really understand why it does not take displaymath. So I believe you should file a report to MathJax and see what their answer is. If I understand correctly, the displaymath environment is somehow fragile. When using amsmath.sty (which is a good idea), then displaymath is redefined anyway to fall back to equation*. Do the LaTeX experts on this group have a comment on this issue? It seems strange that displaymath would need special configuration of MathJax while all the other environments do work out of the box. - Carsten On Dec 7, 2010, at 6:42 PM, =C5=81ukasz Stelmach wrote: > Greetings All. > > The following patch makes MathJax consider \begin{displaymath} and > \end{displaymath} as math environmetn boundaries. For someone who, =20 > like > me, keeps "The not so short introduction to LaTeX2e" alway around, the > displaymath environment is the default way to introduce a block of =20 > 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, =20 > using something like > \"TeX/noUndefined.js\"], > tex2jax: { > inlineMath: [ [\"\\\\(\",\"\\\\)\"] ], > - displayMath: [ ['$$','$$'], [\"\\\\[\",\"\\\\]\"] ], > + displayMath: [ ['$$','$$'], [\"\\\\[\",\"\\\\]\"], [\"\\=20= > \\begin{displaymath}\",\"\\\\end{displaymath}\"] ], > skipTags: [\"script\",\"noscript\",\"style\",\"textarea=20 > \",\"pre\",\"code\"], > ignoreClass: \"tex2jax_ignore\", > processEscapes: false, > --8<---------------cut here---------------end--------------->8--- > > --=20 > Mi=C5=82ego dnia, > =C5=81ukasz Stelmach > > > _______________________________________________ > 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