emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Chris Gray <chrismgray@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: Bug: LaTeX export and LaTeX environment
Date: Tue, 01 Jun 2010 17:02:11 +0200	[thread overview]
Message-ID: <86pr0ayex8.fsf@portan.ibr.cs.tu-bs.de> (raw)
In-Reply-To: 86y6eyyhwo.fsf@portan.ibr.cs.tu-bs.de

[-- Attachment #1: Type: text/plain, Size: 268 bytes --]

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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: org-special-blocks-arguments.diff --]
[-- Type: text/x-diff, Size: 1389 bytes --]

commit 7a34d757ffbdeb97e7818411c5fe33e6339312e1
Author: Chris Gray <chrismgray@gmail.com>
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)
 


[-- Attachment #3: Type: text/plain, Size: 201 bytes --]

_______________________________________________
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

  parent reply	other threads:[~2010-06-01 15:24 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-19  6:34 Bug: LaTeX export and LaTeX environment Ulf Stegemann
2010-05-19  6:57 ` Carsten Dominik
2010-05-19  7:27   ` Ulf Stegemann
2010-05-19 19:20     ` Mark Elston
2010-06-01 13:42       ` Carsten Dominik
2010-06-01 13:57         ` Chris Gray
2010-06-01 14:46           ` Carsten Dominik
2010-06-01 15:02           ` Chris Gray [this message]
2010-06-01 21:20             ` Mark Elston
2010-06-02  8:28               ` Chris Gray

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86pr0ayex8.fsf@portan.ibr.cs.tu-bs.de \
    --to=chrismgray@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).