emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Suvayu Ali <fatkasuvayu+linux@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: resize table in latex
Date: Mon, 1 Jun 2015 18:35:52 +0200	[thread overview]
Message-ID: <20150601163552.GF30465@chitra.no-ip.org> (raw)
In-Reply-To: <1529a4f6-d431-4600-98a5-4910120dcecd@HUB01.ad.oak.ox.ac.uk>

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.

  parent reply	other threads:[~2015-06-01 16:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-01 10:51 resize table in latex Zhihao Ding
2015-06-01 11:21 ` Loris Bennett
2015-06-01 16:35 ` Suvayu Ali [this message]
2015-06-02  8:43   ` Zhihao Ding
2015-06-02  9:06     ` Suvayu Ali
2015-06-02  9:59       ` Zhihao Ding

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150601163552.GF30465@chitra.no-ip.org \
    --to=fatkasuvayu+linux@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).