diff options
author | Nicolas Goaziou <n.goaziou@gmail.com> | 2012-05-06 20:10:21 +0200 |
---|---|---|
committer | Nicolas Goaziou <n.goaziou@gmail.com> | 2012-05-06 20:10:21 +0200 |
commit | b5c0d7d2d1688639a3a8c4ae86ca91a696b53bc6 (patch) | |
tree | a3c2024d65f0f3b10926d5fc543ba85ec6e8dd23 | |
parent | c2aac5f1951aa5ad765b989b01628fd35fff28e3 (diff) | |
download | org-mode-b5c0d7d2d1688639a3a8c4ae86ca91a696b53bc6.tar.gz |
org-e-latex: Fix table alignment for tables starting with a rule
* contrib/lisp/org-e-latex.el (org-e-latex-table--align-string): Fix
table alignment for tables starting with a rule.
-rw-r--r-- | contrib/lisp/org-e-latex.el | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/contrib/lisp/org-e-latex.el b/contrib/lisp/org-e-latex.el index 6476db6..3cddc9d 100644 --- a/contrib/lisp/org-e-latex.el +++ b/contrib/lisp/org-e-latex.el @@ -2007,13 +2007,16 @@ a communication channel." (let ((attr (mapconcat 'identity (org-element-property :attr_latex table) " "))) - (if (and attr (string-match "\\<align=\\(\\S-+\\)" attr)) - (match-string 1 attr) + (if (string-match "\\<align=\\(\\S-+\\)" attr) (match-string 1 attr) (let (alignment) ;; Extract column groups and alignment from first (non-rule) ;; row. (org-element-map - (org-element-map table 'table-row 'identity info 'first-match) + (org-element-map + table 'table-row + (lambda (row) + (and (eq (org-element-property :type row) 'standard) row)) + info 'first-match) 'table-cell (lambda (cell) (let ((borders (org-export-table-cell-borders cell info))) |