[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] Exporting booktabs as tables
From: |
Rasmus |
Subject: |
[O] Exporting booktabs as tables |
Date: |
Thu, 23 Jun 2011 15:01:39 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
Hi,
I use booktabs from library of babel for LaTeX export.
I want to export an booktab-org-table as an actual latex-table (i.e. not
tabular only).
An example follows. The question is how to make #+call be recognized
and treated as a 'first-class' table. (I could do it in LaTeX manner,
but I am trying to become more 'Org-Centric').
#+begin_src org
#+LATEX_HEADER: \usepackage{booktabs}
* COMMENT Tables
#+CAPTION: This is not a table!
#+LABEL: tbl:table
#+ATTR_LaTeX: table
#+tblname: budget
| Post | Beløb [\textsc{dkk}] |
|--------+----------------------|
| post 1 | 2250 |
| post 2 | 1500 |
| post 3 | 375 |
| post 4 | 525 |
|--------+----------------------|
| Total | 4650 |
#+TBLFM: @5$2=vsum(@address@hidden)
* Export
#+call: booktabs(table=budget, align="@address@hidden") :results latex :exports
results
#+CAPTION: This is a table
| Post | Beløb [\textsc{dkk}] |
|--------+----------------------|
| post 1 | 2250 |
| post 2 | 1500 |
| post 3 | 375 |
| post 4 | 525 |
|--------+----------------------|
| Total | 4650 |
#+end_src
Which results in the following. Notice that the first is a tabular. I
want it to be wrapped in a table-environment.
#+begin_src latex
% [snip]
address@hidden@{}}
\toprule
Post & Beløb [\textsc{dkk}] \\
\midrule
post 1 & 2250 \\
post 2 & 1500 \\
post 3 & 375 \\
post 4 & 525 \\
\hline
Total & 4650 \\
\bottomrule
\end{tabular}
\begin{table}[htb]
\caption{This is a table}
\begin{center}
\begin{tabular}{lr}
Post & Beløb [\textsc{dkk}] \\
\hline
post 1 & 2250 \\
post 2 & 1500 \\
post 3 & 375 \\
post 4 & 525 \\
\hline
Total & 4650 \\
\end{tabular}
\end{center}
\end{table}
#+end_src
Thanks,
Rasmus
--
Sent from my Emacs
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [O] Exporting booktabs as tables,
Rasmus <=