emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] resize org-table when exporting to latex


From: Vicente Vera
Subject: Re: [O] resize org-table when exporting to latex
Date: Tue, 28 Feb 2017 14:17:20 +0000

This requires some LaTeX plumbing work. A few tricks:

First, use tabularx as suggested to stretch the columns automatically as the size of the table changes.

- Use a smaller font size, such as :font \scriptsize
- Enlarge the table horizontally (for example: :width 0.8\paperheight)
- Put the page in landscape with the "pdflscape" package: wrap the table with "#+BEGIN_landscape ... #+END_landscape" and change :width to \paperheight
- Use package "graphicx" and wrap the table in "#+LATEX: \resizebox{0.8\paperheight}{!}{ ... #+LATEX: }" to make the whole table smaller

An example of the above in Org syntax (remember to call the necessary packages):

#+BEGIN_landscape
#+ATTR_LATEX: :options [htbp]
#+BEGIN_table
#+BEGIN_center
#+LATEX: \resizebox{0.8\paperheight}{!}{
#+CAPTION: A big table made small
#+BEGIN_threeparttable
#+ATTR_LATEX: :center nil :environment tabularx :width \paperheight :align XXXXXXXX :font \scriptsize :booktabs t
...
#+ATTR_LATEX: :options [flushleft]
#+BEGIN_tablenotes
\item[] Source: Someone on the Internet.
#+END_tablenotes
#+END_threeparttable
#+LATEX: }
#+END_center
#+END_table
#+END_landscape


2017-02-28 0:21 GMT+00:00 Jeremie Juste <address@hidden>:

Hello,

Is there a way to resize latex table when exporting to latex?
For now my only recourse is to export the latex table copy the latex
code back to org-mode apply \scalebox.

Do you have a more convenient way in mind?

Best wishes,

Jeremie








reply via email to

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