From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Gray Subject: Re: Bug: LaTeX export and LaTeX environment Date: Tue, 01 Jun 2010 17:02:11 +0200 Message-ID: <86pr0ayex8.fsf@portan.ibr.cs.tu-bs.de> References: <4BF439F0.3030307@comcast.net> <5859BB7B-CDBB-4E2E-BB4E-5308AB734C5D@gmail.com> <86y6eyyhwo.fsf@portan.ibr.cs.tu-bs.de> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from [140.186.70.92] (port=35819 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OJTKH-00070u-Ht for emacs-orgmode@gnu.org; Tue, 01 Jun 2010 11:24:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OJSzD-0003LF-Is for emacs-orgmode@gnu.org; Tue, 01 Jun 2010 11:02:40 -0400 Received: from lo.gmane.org ([80.91.229.12]:44912) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OJSzD-0003L8-9H for emacs-orgmode@gnu.org; Tue, 01 Jun 2010 11:02:35 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1OJSzB-0003g3-0K for emacs-orgmode@gnu.org; Tue, 01 Jun 2010 17:02:33 +0200 Received: from portan.ibr.cs.tu-bs.de ([134.169.34.77]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 01 Jun 2010 17:02:32 +0200 Received: from chrismgray by portan.ibr.cs.tu-bs.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 01 Jun 2010 17:02:32 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --=-=-= Chris Gray wrote: > I actually needed this yesterday, so I'll make a patch and try to send > it in the next couple of days. Here is the patch for the LaTeX exporter. I'm not much of an HTML person, so I don't know if arguments would be useful there. Cheers, Chris --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=org-special-blocks-arguments.diff 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) --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --=-=-=--