Browse Source

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.
Nicolas Goaziou 13 năm trước cách đây
mục cha
commit
b5c0d7d2d1
1 tập tin đã thay đổi với 6 bổ sung3 xóa
  1. 6 3
      contrib/lisp/org-e-latex.el

+ 6 - 3
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)))