From 3470c44a7ef48a92848c39741b25e7c7cf0dddf8 Mon Sep 17 00:00:00 2001 From: Rasmus Date: Sat, 25 Jan 2014 15:27:30 +0100 Subject: [PATCH] Drop caption in ox-latex math-tables * ox-latex.el (org-latex--math-table): Drop captions silently. --- lisp/ox-latex.el | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el index 4522c6b..4f961cb 100644 --- a/lisp/ox-latex.el +++ b/lisp/ox-latex.el @@ -2577,7 +2577,10 @@ used as a communication channel. This function assumes TABLE has `org' as its `:type' property and `inline-math' or `math' as its `:mode' attribute.." - (let* ((caption (org-latex--caption/label-string table info)) + (let* (;; Silently drop captions as they are not supported in + ;; math-mode. + (caption (org-latex--caption/label-string + (org-element-put-property table :caption nil) info)) (attr (org-export-read-attribute :attr_latex table)) (inlinep (equal (plist-get attr :mode) "inline-math")) (env (or (plist-get attr :environment) @@ -2651,8 +2654,7 @@ This function assumes TABLE has `org' as its `:type' property and '(0 nil)) (funcall same-mode-p prev)) (setq cluster-beg prev)) - (and (or (org-element-property :caption cluster-beg) - (org-element-property :name cluster-beg)) + (and (org-element-property :name cluster-beg) "\n\\end{equation}"))) (t "\\]"))))) -- 1.8.5.3