emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Orgmode] [PATCH] displaymath environment and MathJax


From: Łukasz Stelmach
Subject: [Orgmode] [PATCH] displaymath environment and MathJax
Date: Tue, 07 Dec 2010 18:42:47 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]