emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] [PATCH] LaTeX export: added support for sidewaystable from the rotat


From: Andreas Leha
Subject: [O] [PATCH] LaTeX export: added support for sidewaystable from the rotating package
Date: Thu, 15 Mar 2012 10:15:41 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.94 (gnu/linux)

Hi all,

below you find a small patch that allows to use sidewaystable during
latex export, i.e. this file should export as expected:

,----[ test.org ]
| * Test sidewaystable
| 
|   #+CAPTION: A sideways table
|   #+ATTR_LaTeX: sidewaystable
|   | The     | header |
|   |---------+--------|
|   | entries | here   |
| 
| * LaTeX Options                                                          
:noexport:
| #+LATEX_HEADER: \usepackage{rotating}
`----

This is a patch for the "old" LaTeX exporter.  Still, it might lead to
cleaner documents for somebody.

Cheers,
Andreas


---
 lisp/org-latex.el |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/lisp/org-latex.el b/lisp/org-latex.el
index 03664b4..aec4f1d 100644
--- a/lisp/org-latex.el
+++ b/lisp/org-latex.el
@@ -1917,10 +1917,14 @@ The conversion is made depending of STRING-BEFORE and 
STRING-AFTER."
                          'org-label raw-table)
                   longtblp (and attr (stringp attr)
                                 (string-match "\\<longtable\\>" attr))
-                 tblenv (if (and attr (stringp attr)
-                                 (or (string-match (regexp-quote "table*") 
attr)
-                                     (string-match "\\<multicolumn\\>" attr)))
-                            "table*" "table")
+                 tblenv (if (and attr (stringp attr))
+                            (cond ((string-match "\\<sidewaystable\\>" attr)
+                                   "sidewaystable")
+                                  ((or (string-match (regexp-quote "table*") 
attr)
+                                       (string-match "\\<multicolumn\\>" attr))
+                                   "table*")
+                                  (t "table"))
+                          "table")
                  tabular-env
                  (if (and attr (stringp attr)
                           (string-match "\\(tabular.\\)" attr))
-- 
1.7.9.1





reply via email to

[Prev in Thread] Current Thread [Next in Thread]