summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMyles English <mylesenglish@gmail.com>2012-11-17 15:18:16 (GMT)
committer Nicolas Goaziou <n.goaziou@gmail.com>2012-11-17 15:44:47 (GMT)
commit359b10b3070588e8b751935b3fbcc2c9d8885a6a (patch)
tree31a9c5c27c46744fbed8ef6a436b1e3acc378e45
parent4c7dcd083079584827fbede7997077fe473616cd (diff)
downloadorg-mode-359b10b3070588e8b751935b3fbcc2c9d8885a6a.zip
org-mode-359b10b3070588e8b751935b3fbcc2c9d8885a6a.tar.gz
org-e-latex: Fixes bug introduced by commit 907110e
* contrib/lisp/org-e-latex.el: Floating tables get a \centering declaration, otherwise the table get wrapped in \begin{center} and \end{center} environment. Thanks to Andreas Leha for reporting it. TINYCHANGE
-rw-r--r--contrib/lisp/org-e-latex.el18
1 files changed, 10 insertions, 8 deletions
diff --git a/contrib/lisp/org-e-latex.el b/contrib/lisp/org-e-latex.el
index 41513a1..84ef2a5 100644
--- a/contrib/lisp/org-e-latex.el
+++ b/contrib/lisp/org-e-latex.el
@@ -2302,20 +2302,22 @@ This function assumes TABLE has `org' as its `:type' attribute."
(if (or org-e-latex-table-caption-above (string= "" caption)) ""
(concat (org-trim caption) "\\\\\n"))))
;; Others.
- (t (concat (when float-env
- (concat
- (format "\\begin{%s}%s\n" float-env placement)
- (if org-e-latex-table-caption-above caption "")))
- (when org-e-latex-tables-centered "\\centering\n")
+ (t (concat (if float-env
+ (concat
+ (format "\\begin{%s}%s\n" float-env placement)
+ (if org-e-latex-table-caption-above caption "")
+ (when org-e-latex-tables-centered "\\centering\n"))
+ (when org-e-latex-tables-centered "\\begin{center}\n"))
(format "\\begin{%s}%s{%s}\n%s\\end{%s}"
table-env
(if width (format "{%s}" width) "")
alignment
contents
table-env)
- (when float-env
- (concat (if org-e-latex-table-caption-above "" caption)
- (format "\n\\end{%s}" float-env))))))))
+ (if float-env
+ (concat (if org-e-latex-table-caption-above "" caption)
+ (format "\n\\end{%s}" float-env))
+ (when org-e-latex-tables-centered "\n\\end{center}")))))))
(defun org-e-latex-table--table.el-table (table contents info)
"Return appropriate LaTeX code for a table.el table.