emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] resize table in latex


From: Suvayu Ali
Subject: Re: [O] resize table in latex
Date: Mon, 1 Jun 2015 18:35:52 +0200
User-agent: Mutt/1.5.23.1 (2014-03-12)

On Mon, Jun 01, 2015 at 10:51:24AM +0000, Zhihao Ding wrote:
> Hi there, 
> 
> I am trying to find a way to automatically resize tables
> in the latex output.
> 
> When doing slides in beamer, I use this to resize tables 
> to fit in a frame
> 
>      #+LaTeX: \scriptsize{\resizebox{\textwidth}{!}{
>       | . | . |
>      #+LaTeX: }}
> 
> While when writing reports, I use the following instead 
> as I need to cross reference it by the name
> 
>      #+CAPTION: table caption
>      #+NAME: table:label
>       | . | . |
> 
> then I loose the resize facility.  How could I combine 
> the two? I tried to fiddle with 
> #+ATTR_LATEX but didn’t mange to make it work. 

I don't follow.  Why do you say you lose the facility?  The following:

  #+LaTeX: \scriptsize{\resizebox{\textwidth}{!}{
  #+CAPTION: table caption
  #+NAME: table:label
     | . | . |
     | . | . |
  #+LaTeX: }}

exports as:

  \scriptsize{\resizebox{\textwidth}{!}{
  \begin{table}[htb]
  \caption{\label{tab:orgtable1}
  table caption}
  \centering
  \begin{tabular}{ll}
  . & .\\
  . & .\\
  \end{tabular}
  \end{table}
  }}

Isn't that exactly what you want?

-- 
Suvayu

Open source is the future. It sets us free.



reply via email to

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