summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Dominik <carsten.dominik@gmail.com>2010-06-22 14:51:48 +0200
committerCarsten Dominik <carsten.dominik@gmail.com>2010-06-22 14:51:48 +0200
commit80531d8d7162a0117ab3d607ce30c27df1d7d102 (patch)
treef8bcd14e403f010aa512fb3af4966523cf5e6fbf
parent36b6471858c66d1b0fe165c77b189e8fc035adb9 (diff)
downloadorg-mode-80531d8d7162a0117ab3d607ce30c27df1d7d102.tar.gz
* contrib/lisp/org-special-blocks.el
(org-special-blocks-convert-latex-special-cookies): Allow arguments to TeX macros
-rw-r--r--contrib/lisp/org-special-blocks.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/contrib/lisp/org-special-blocks.el b/contrib/lisp/org-special-blocks.el
index d97cff3..11d4c01 100644
--- a/contrib/lisp/org-special-blocks.el
+++ b/contrib/lisp/org-special-blocks.el
@@ -64,13 +64,14 @@ seen. This is run after a few special cases are taken care of."
(defun org-special-blocks-convert-latex-special-cookies ()
"Converts the special cookies into LaTeX blocks."
(goto-char (point-min))
- (while (re-search-forward "^ORG-\\(.*\\)-\\(START\\|END\\)$" nil t)
+ (while (re-search-forward "^ORG-\\([^ \t\n]*\\)[ \t]*\\(.*\\)-\\(START\\|END\\)$" nil t)
(replace-match
- (if (equal (match-string 2) "START")
- (concat "\\begin{" (match-string 1) "}")
+ (if (equal (match-string 3) "START")
+ (concat "\\begin{" (match-string 1) "}" (match-string 2))
(concat "\\end{" (match-string 1) "}"))
t t)))
+
(add-hook 'org-export-latex-after-blockquotes-hook
'org-special-blocks-convert-latex-special-cookies)