Browse Source

LaTeX export: Allow to customize the tabular environment

* lisp/org-latex.el (org-export-latex-tabular-environment): New option.
(org-export-latex-tables): Use `org-export-latex-tabular-environment'.
Carsten Dominik 14 years ago
parent
commit
e1262e57d2
1 changed files with 11 additions and 2 deletions
  1. 11 2
      lisp/org-latex.el

+ 11 - 2
lisp/org-latex.el

@@ -415,6 +415,11 @@ and `org-export-with-tags' instead."
   :group 'org-export-latex
   :group 'org-export-latex
   :type 'string)
   :type 'string)
 
 
+(defcustom org-export-latex-tabular-environment "tabular"
+  "Default environment used to build tables."
+  :group 'org-export-latex
+  :type 'string)
+
 (defcustom org-export-latex-inline-image-extensions
 (defcustom org-export-latex-inline-image-extensions
   '("pdf" "jpeg" "jpg" "png" "ps" "eps")
   '("pdf" "jpeg" "jpg" "png" "ps" "eps")
   "Extensions of image files that can be inlined into LaTeX.
   "Extensions of image files that can be inlined into LaTeX.
@@ -1660,7 +1665,9 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER."
                         (if (and longtblp caption) "\\\\\n" "\n")
                         (if (and longtblp caption) "\\\\\n" "\n")
                         (if (and org-export-latex-tables-centered (not longtblp))
                         (if (and org-export-latex-tables-centered (not longtblp))
                             "\\begin{center}\n")
                             "\\begin{center}\n")
-                        (if (not longtblp) (concat "\\begin{tabular}{" align "}\n"))
+                        (if (not longtblp)
+			    (format "\\begin{%s}{%s}\n"
+				    org-export-latex-tabular-environment align))
                         (orgtbl-to-latex
                         (orgtbl-to-latex
                          lines
                          lines
                          `(:tstart nil :tend nil
                          `(:tstart nil :tend nil
@@ -1672,7 +1679,9 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER."
 \\endfoot
 \\endfoot
 \\endlastfoot" (length org-table-last-alignment))
 \\endlastfoot" (length org-table-last-alignment))
                                              nil)))
                                              nil)))
-                        (if (not longtblp) (concat "\n\\end{tabular}"))
+                        (if (not longtblp)
+			    (format "\n\\end{%s}"
+				    org-export-latex-tabular-environment))
                         (if longtblp "\n" (if org-export-latex-tables-centered
                         (if longtblp "\n" (if org-export-latex-tables-centered
                                               "\n\\end{center}\n" "\n"))
                                               "\n\\end{center}\n" "\n"))
                         (if longtblp
                         (if longtblp