From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Exporting booktabs as tables Date: Thu, 23 Jun 2011 15:01:39 +0200 Message-ID: <87y60swvkc.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([140.186.70.92]:35579) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QZjWP-0005gI-D8 for emacs-orgmode@gnu.org; Thu, 23 Jun 2011 09:00:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QZjWN-0004EI-NJ for emacs-orgmode@gnu.org; Thu, 23 Jun 2011 09:00:37 -0400 Received: from lo.gmane.org ([80.91.229.12]:37099) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QZjWN-0004E7-7S for emacs-orgmode@gnu.org; Thu, 23 Jun 2011 09:00:35 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1QZjWI-0005hE-L5 for emacs-orgmode@gnu.org; Thu, 23 Jun 2011 15:00:30 +0200 Received: from h240.natout.aau.dk ([130.225.198.240]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 23 Jun 2011 15:00:30 +0200 Received: from rasmus.pank by h240.natout.aau.dk with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 23 Jun 2011 15:00:30 +0200 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org 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(@1..@-1) * Export #+call: booktabs(table=budget, align="@{}lr@{}") :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] \begin{tabular}{@{}lr@{}} \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