From 001944f24bd3ccad266e85331b58a133fd5d381c Mon Sep 17 00:00:00 2001 From: Michael Olson Date: Sat, 21 Apr 2007 18:28:21 +0000 Subject: [PATCH] muse-latex2png: Make this work with ConTeX 2007-04-21 Michael Olson * lisp/muse-latex2png.el (muse-publish-math-tag): If using the yet-to-be-included "context" publishing style, use "$$" rather than "\[" and "\]". Thanks to Jean Magnan de Bornier for pointing this out. git-archimport-id: mwolson@gnu.org--2006/muse--main--1.0--patch-297 --- ChangeLog | 7 +++++++ lisp/muse-latex2png.el | 13 ++++++++++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 69030d8..90b8a3c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2007-04-21 Michael Olson + + * lisp/muse-latex2png.el (muse-publish-math-tag): If using the + yet-to-be-included "context" publishing style, use "$$" rather + than "\[" and "\]". Thanks to Jean Magnan de Bornier for pointing + this out. + 2007-04-20 Michael Olson * lisp/muse-publish.el (muse-publish-inhibit-style-hooks): New diff --git a/lisp/muse-latex2png.el b/lisp/muse-latex2png.el index 794f73b..b12c5af 100644 --- a/lisp/muse-latex2png.el +++ b/lisp/muse-latex2png.el @@ -215,7 +215,8 @@ current style is not Latex-based, generate an image for the given Latex math code. If 6 or more spaces come before the tag, surrouund the region -with \"$$\" instead." +with the equivalent of \"$$\" instead, which causes the region to +be centered in the published output (among other things)." (let* ((centered (and (re-search-backward (concat "^[" muse-regexp-blank "]\\{6,\\}\\=") nil t) @@ -228,8 +229,14 @@ with \"$$\" instead." (delete-char 1) (forward-char 1))) (setq beg (point))))) - (tag-beg (if centered "\\[ " "$")) - (tag-end (if centered " \\]" "$")) + (tag-beg (if centered + (if (muse-style-derived-p "context") + "$$" "\\[ ") + "$")) + (tag-end (if centered + (if (muse-style-derived-p "context") + "$$" " \\]") + "$")) (attrs (nconc (list (cons "prefix" (concat "latex2png-" (muse-page-name)))) (if centered nil -- 2.11.4.GIT