commit 7a34d757ffbdeb97e7818411c5fe33e6339312e1 Author: Chris Gray Date: Tue Jun 1 16:52:52 2010 +0200 Add arguments to environments in the LaTeX expansion of org-special-blocks * contrib/lisp/org-special-blocks.el (org-special-blocks-convert-latex-special-cookies): Implement the change by slightly altering the regexp. Modified contrib/lisp/org-special-blocks.el diff --git a/contrib/lisp/org-special-blocks.el b/contrib/lisp/org-special-blocks.el index af50b30..a6064b1 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)