summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2019-01-24 14:47:04 +0100
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2019-01-24 14:47:04 +0100
commit102142b1a535c1100909f0ac2c68476265ac23cf (patch)
tree66dd4a12009d31f256a582ba3cfe5a627bc1418b
parentc413bbb3b0877f11443f7aa376f5a5c6b961c3c3 (diff)
downloadorg-mode-102142b1a535c1100909f0ac2c68476265ac23cf.tar.gz
ox-latex: Fix environment for tables without caption, take 2
* lisp/ox-latex.el (org-latex--decorate-table): Check if caption is the empty string.
-rw-r--r--lisp/ox-latex.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index 998226e..893192a 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -3144,8 +3144,9 @@ centered."
"Decorate TABLE string with caption and float environment.
ATTRIBUTES is the plist containing is LaTeX attributes. CAPTION
-is its caption. It is located above the table if ABOVE? is
-non-nil. INFO is the plist containing current export parameters.
+is its caption, as a string or nil. It is located above the
+table if ABOVE? is non-nil. INFO is the plist containing current
+export parameters.
Return new environment, as a string."
(let* ((float-environment
@@ -3153,7 +3154,7 @@ Return new environment, as a string."
(cond ((and (not float) (plist-member attributes :float)) nil)
((member float '("sidewaystable" "sideways")) "sidewaystable")
((equal float "multicolumn") "table*")
- ((or float caption) "table")
+ ((or float (org-string-nw-p caption)) "table")
(t nil))))
(placement
(or (plist-get attributes :placement)