diff options
author | Carsten Dominik <carsten.dominik@gmail.com> | 2010-05-15 14:26:38 +0200 |
---|---|---|
committer | Carsten Dominik <carsten.dominik@gmail.com> | 2010-05-15 14:26:38 +0200 |
commit | 2d3817d51afbfbe4e3fd9b06232c10f544ccb216 (patch) | |
tree | 9baedc6bf24b326e2902133eff14889d5ba1ac91 | |
parent | 9cb5299bd103803f8d1bc823c2ea8a7aa38aafed (diff) | |
download | org-mode-2d3817d51afbfbe4e3fd9b06232c10f544ccb216.tar.gz |
LaTeX export: Implement table* environment for wide tables
Patch by Chris Gray.
-rw-r--r-- | doc/ChangeLog | 5 | ||||
-rw-r--r-- | doc/org.texi | 6 | ||||
-rw-r--r-- | lisp/ChangeLog | 5 | ||||
-rw-r--r-- | lisp/org-latex.el | 13 |
4 files changed, 24 insertions, 5 deletions
diff --git a/doc/ChangeLog b/doc/ChangeLog index 6c24e78..35b215e 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,8 @@ +2010-05-15 Carsten Dominik <carsten.dominik@gmail.com> + + * org.texi (Tables in LaTeX export): Document the multicolumn + keyword. + 2010-05-10 Carsten Dominik <carsten.dominik@gmail.com> * org.texi (The date/time prompt): Document the new keys `C-v' diff --git a/doc/org.texi b/doc/org.texi index 8f23992..e418250 100644 --- a/doc/org.texi +++ b/doc/org.texi @@ -9676,8 +9676,10 @@ All lines between these markers are exported literally For La@TeX{} export of a table, you can specify a label and a caption (@pxref{Images and tables}). You can also use the @code{ATTR_LaTeX} line to -request a longtable environment for the table, so that it may span several -pages. Finally, you can set the alignment string: +request a @code{longtable} environment for the table, so that it may span +several pages, or provide the @code{multicolumn} keyword that will make the +table span the page in a multicolumn environment (@code{table*} environment). +Finally, you can set the alignment string: @cindex #+CAPTION @cindex #+LABEL diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2bd6688..fa45010 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2010-05-15 Carsten Dominik <carsten.dominik@gmail.com> + + * org-latex.el (org-export-latex-format-image): Add support + for multicolumn figures in LaTeX. + 2010-05-14 David Maus <dmaus@ictsoc.de> * org.el (org-clone-subtree-with-time-shift): Remove ID diff --git a/lisp/org-latex.el b/lisp/org-latex.el index 2f09290..f0e41b9 100644 --- a/lisp/org-latex.el +++ b/lisp/org-latex.el @@ -1889,15 +1889,17 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER." (defun org-export-latex-format-image (path caption label attr) "Format the image element, depending on user settings." - (let (ind floatp wrapp placement figenv) + (let (ind floatp wrapp multicolumnp placement figenv) (setq floatp (or caption label)) (setq ind (org-get-text-property-any 0 'original-indentation path)) (when (and attr (stringp attr)) (if (string-match "[ \t]*\\<wrap\\>" attr) (setq wrapp t floatp nil attr (replace-match "" t t attr))) (if (string-match "[ \t]*\\<float\\>" attr) - (setq wrapp nil floatp t attr (replace-match "" t t attr)))) - + (setq wrapp nil floatp t attr (replace-match "" t t attr))) + (if (string-match "[ \t]*\\<multicolumn\\>" attr) + (setq multicolumnp t attr (replace-match "" t t attr)))) + (setq placement (cond (wrapp "{l}{0.5\\textwidth}") @@ -1920,6 +1922,11 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER." \\includegraphics[%attr]{%path} \\caption{%labelcmd%caption} \\end{wrapfigure}") + (multicolumnp "\\begin{figure*}%placement +\\centering +\\includegraphics[%attr]{%path} +\\caption{%labelcmd%caption} +\\end{figure*}") (floatp "\\begin{figure}%placement \\centering \\includegraphics[%attr]{%path} |