From c804bef74bc7885b73d8008af826c61ac9176b8c Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Wed, 8 Feb 2012 22:36:18 +0100 Subject: [PATCH] org-e-latex: Small refactoring * EXPERIMENTAL/org-e-latex.el (org-e-latex-table--format-string): Small refactoring. --- EXPERIMENTAL/org-e-latex.el | 55 ++++++++++++++++++++------------------------- 1 file changed, 24 insertions(+), 31 deletions(-) diff --git a/EXPERIMENTAL/org-e-latex.el b/EXPERIMENTAL/org-e-latex.el index d3282483a..8e92ee0b9 100644 --- a/EXPERIMENTAL/org-e-latex.el +++ b/EXPERIMENTAL/org-e-latex.el @@ -1714,11 +1714,12 @@ TABLE-INFO is the plist containing format info about the table, as returned by `org-export-table-format-info'. INFO is a plist used as a communication channel. -The format string one placeholder for the body of the table." +The format string leaves one placeholder for the body of the +table." (let* ((label (org-element-get-property :name table)) (caption (org-e-latex--caption/label-string (org-element-get-property :caption table) label info)) - (attr (mapconcat #'identity + (attr (mapconcat 'identity (org-element-get-property :attr_latex table) " ")) ;; Determine alignment string. @@ -1727,8 +1728,8 @@ The format string one placeholder for the body of the table." (table-env (cond ((not attr) org-e-latex-default-table-environment) ((string-match "\\" attr) "longtable") - ((string-match "\\(tabular.\\)" attr) - (org-match-string-no-properties 1 attr)) + ((string-match "\\" attr) + (org-match-string-no-properties 0 attr)) (t org-e-latex-default-table-environment))) ;; If table is a float, determine environment: table or table*. (float-env (cond @@ -1739,29 +1740,23 @@ The format string one placeholder for the body of the table." "table*") ((or (not (string= caption "")) label) "table"))) ;; Extract others display options. - (width (and attr - (string-match "\\