emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Łukasz Stelmach" <lukasz.stelmach@iem.pw.edu.pl>
To: emacs-orgmode@gnu.org
Subject: [PATCH] displaymath environment and MathJax
Date: Tue, 07 Dec 2010 18:42:47 +0100	[thread overview]
Message-ID: <87bp4xscmg.fsf%lukasz.stelmach@iem.pw.edu.pl> (raw)

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	other threads:[~2010-12-07 17:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-07 17:42 Łukasz Stelmach [this message]
2010-12-09 11:04 ` [PATCH] displaymath environment and MathJax Carsten Dominik
2010-12-12 12:16 ` Carsten Dominik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87bp4xscmg.fsf%lukasz.stelmach@iem.pw.edu.pl \
    --to=lukasz.stelmach@iem.pw.edu.pl \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).