summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <n.goaziou@gmail.com>2012-11-17 13:47:26 (GMT)
committer Nicolas Goaziou <n.goaziou@gmail.com>2012-11-17 13:47:26 (GMT)
commitdaf0275085bf75ca83006317e0461c25da74c97a (patch)
tree64c804827762bae8238d1e475fed6535fee9573e
parent74faf5bd26d4aea1124dd087fbd99323559459ff (diff)
downloadorg-mode-daf0275085bf75ca83006317e0461c25da74c97a.zip
org-mode-daf0275085bf75ca83006317e0461c25da74c97a.tar.gz
org-e-latex: Stuff label and caption within special blocks
* contrib/lisp/org-e-latex.el (org-e-latex-special-block): Stuff label and caption within special blocks.
-rw-r--r--contrib/lisp/org-e-latex.el10
1 files changed, 7 insertions, 3 deletions
diff --git a/contrib/lisp/org-e-latex.el b/contrib/lisp/org-e-latex.el
index 5635c6a..41513a1 100644
--- a/contrib/lisp/org-e-latex.el
+++ b/contrib/lisp/org-e-latex.el
@@ -1973,9 +1973,13 @@ holding contextual information."
CONTENTS holds the contents of the block. INFO is a plist
holding contextual information."
(let ((type (downcase (org-element-property :type special-block))))
- (org-e-latex--wrap-label
- special-block
- (format "\\begin{%s}\n%s\\end{%s}" type contents type))))
+ (concat (format "\\begin{%s}\n" type)
+ ;; Insert any label or caption within the block
+ ;; (otherwise, a reference pointing to that element will
+ ;; count the section instead).
+ (org-e-latex--caption/label-string special-block info)
+ contents
+ (format "\\end{%s}" type))))
;;;; Src Block