Browse Source

* contrib/lisp/org-special-blocks.el
(org-special-blocks-convert-latex-special-cookies): Allow arguments to
TeX macros

Carsten Dominik 15 years ago
parent
commit
80531d8d71
1 changed files with 4 additions and 3 deletions
  1. 4 3
      contrib/lisp/org-special-blocks.el

+ 4 - 3
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)