summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2016-11-06 23:25:06 +0100
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2016-11-06 23:25:06 +0100
commit975260cb2596fb8cf0660cc91f2207c48b845699 (patch)
tree599a8440caac2f875b2305b38376159be040bc7b
parentfda64f1ae2110175662b52daa3a5ec0f967f0c0d (diff)
downloadorg-mode-975260cb2596fb8cf0660cc91f2207c48b845699.tar.gz
ox-latex: Add column groups back in table math mode
* lisp/ox-latex.el (org-latex--math-table): Preserve column groups. Reported-by: Stefanos Carlström <stefanos.carlstrom@fysik.lth.se> <http://permalink.gmane.org/gmane.emacs.orgmode/110086>
-rw-r--r--lisp/ox-latex.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index 57ec1d2..bdb239b 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -3287,8 +3287,10 @@ This function assumes TABLE has `org' as its `:type' property and
(plist-get attr :math-prefix)
;; Environment. Also treat special cases.
(cond ((member env '("array" "tabular"))
- (let ((align (make-string
- (cdr (org-export-table-dimensions table info)) ?c)))
+ ;; Make sure cells are always centered while preserving
+ ;; vertical separators.
+ (let ((align (replace-regexp-in-string
+ "[lr]" "c" (org-latex--align-string table info))))
(format "\\begin{%s}{%s}\n%s\\end{%s}" env align contents env)))
((assoc env org-latex-table-matrix-macros)
(format "\\%s%s{\n%s}"