From 814edb94ffc45c0d1734e42805d8ede33ad81f67 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Mon, 20 May 2013 10:44:44 +0200 Subject: [PATCH 2/2] ox-latex: Implement :starred attribute for special blocks * lisp/ox-latex.el (org-latex-special-block): Implement :starred attribute for special blocks. --- lisp/ox-latex.el | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el index 669c84b..ab5c062 100644 --- a/lisp/ox-latex.el +++ b/lisp/ox-latex.el @@ -2045,15 +2045,17 @@ holding contextual information." "Transcode a SPECIAL-BLOCK element from Org to LaTeX. CONTENTS holds the contents of the block. INFO is a plist holding contextual information." - (let ((type (downcase (org-element-property :type special-block))) - (opt (org-export-read-attribute :attr_latex special-block :options))) - (concat (format "\\begin{%s}%s\n" type (or opt "")) + (let* ((type (downcase (org-element-property :type special-block))) + (attributes (org-export-read-attribute :attr_latex special-block)) + (opt (plist-get attributes :options)) + (starredp (plist-get attributes :starred))) + (concat (format "\\begin{%s%s}%s\n" type (if starredp "*" "") (or opt "")) ;; Insert any label or caption within the block ;; (otherwise, a reference pointing to that element will ;; count the section instead). (org-latex--caption/label-string special-block info) contents - (format "\\end{%s}" type)))) + (format "\\end{%s%s}" type (if starredp "*" ""))))) ;;;; Src Block -- 1.8.2.3