From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vicente Vera Subject: Re: resize org-table when exporting to latex Date: Tue, 28 Feb 2017 14:17:20 +0000 Message-ID: References: <87o9xn88s0.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11416070a18ef7054997da3f Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35727) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ciiai-00041v-65 for emacs-orgmode@gnu.org; Tue, 28 Feb 2017 09:17:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ciiah-0007nX-7p for emacs-orgmode@gnu.org; Tue, 28 Feb 2017 09:17:24 -0500 Received: from mail-ot0-x22f.google.com ([2607:f8b0:4003:c0f::22f]:36663) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ciiah-0007n3-0b for emacs-orgmode@gnu.org; Tue, 28 Feb 2017 09:17:23 -0500 Received: by mail-ot0-x22f.google.com with SMTP id i1so8414875ota.3 for ; Tue, 28 Feb 2017 06:17:21 -0800 (PST) In-Reply-To: <87o9xn88s0.fsf@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Jeremie Juste Cc: emacs-orgmode --001a11416070a18ef7054997da3f Content-Type: text/plain; charset=UTF-8 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 : > > 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 > > > > > > > --001a11416070a18ef7054997da3f Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
This requires some LaTeX plumbing work. A few tricks:=

First, use tabularx as suggested to stretch the columns autom= atically as the size of the table changes.

- Use a smaller font= size, such as :font \scriptsize
- Enlarge the table horizont= ally (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 \paperhei= ght
- 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 s= yntax (remember to call the necessary packages):

#+BEGIN_landscape#+ATTR_LATEX: :options [htbp]
#+BEGIN_table
#+BEGIN_center
#+LAT= EX: \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 <jeremiejuste@gmail.com>:

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







--001a11416070a18ef7054997da3f--