emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Booktabs in new LaTeX exporter


From: RCY
Subject: Re: [O] Booktabs in new LaTeX exporter
Date: Fri, 28 Dec 2012 18:07:48 -0500

Hi Tom,
 I hacked together a preliminary solution that uses the booktabs and threeparttable (for footnotes) packages,  based on the suggestion in section 13.2 of http://orgmode.org/worg/org-tutorials/org-latex-export.html 
It seems to do OK in a simple example, and I will test it some more. It does not export to html.
Thanks for your help.

#+LATEX_CLASS: article
#+latex_header: \usepackage{booktabs,tabularx,threeparttable}

* noexport   :noexport:
#+tblname: test-table   
   | L | R$^1$ | X$^2$ |
   |---+-------+-------|
   | A | B     | C     |
   | D | E     | F     |
   | I | J     | K     |


* do export
#+name: tabularx-export
#+begin_src latex :exports results :results latex :noweb yes
  \begin{table}[htb!]
  \centering
  \begin{threeparttable}[b]
  \footnotesize
  \caption{A table to test booktabs}
  \label{tab:test-table}
<<booktabs(table=test-table,align="lrX",env="tabularx",width="0.5\\textwidth")>>  
  \begin{tablenotes}
    \item [1] A table note ...
    \item [2] A second table note ...
  \end{tablenotes}
\end{threeparttable}
\end{table}
#+end_src


On Fri, Dec 28, 2012 at 2:06 PM, Thomas S. Dye <address@hidden> wrote:
I think the :align attribute expects a string instead of a symbol, so
:align "rr" is probably what you want.

I don't know about the new html exporter yet, but I'd be surprised if it
looks at LaTeX attributes.  You might want to experiment with alignment
cookies in the table to see if they do what you want:

http://orgmode.org/manual/Column-width-and-alignment.html#Column-width-and-alignment

I haven't used threeparttable or ctable.  Org footnotes work inside
tables, if you want the note to appear outside the table.

Typesetting tables is hard.  Let the list know if you get Org to work
with either of these packages.

All the best,
Tom


reply via email to

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