From mboxrd@z Thu Jan 1 00:00:00 1970 From: RCY Subject: Re: Booktabs in new LaTeX exporter Date: Fri, 28 Dec 2012 18:07:48 -0500 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=e89a8ff2534a6b726404d1f1bb2e Return-path: Received: from eggs.gnu.org ([208.118.235.92]:59995) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Toj1s-0001TR-Bz for Emacs-orgmode@gnu.org; Fri, 28 Dec 2012 18:07:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Toj1p-0000MR-FB for Emacs-orgmode@gnu.org; Fri, 28 Dec 2012 18:07:52 -0500 Received: from mail-oa0-f42.google.com ([209.85.219.42]:65218) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Toj1p-0000M7-7N for Emacs-orgmode@gnu.org; Fri, 28 Dec 2012 18:07:49 -0500 Received: by mail-oa0-f42.google.com with SMTP id j1so10378005oag.1 for ; Fri, 28 Dec 2012 15:07:48 -0800 (PST) In-Reply-To: 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: "Thomas S. Dye" Cc: Emacs-orgmode@gnu.org --e89a8ff2534a6b726404d1f1bb2e Content-Type: text/plain; charset=ISO-8859-1 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} <> \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 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 > > --e89a8ff2534a6b726404d1f1bb2e Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi Tom,
=A0I hacked together a preliminary solution that uses the bookt= abs and threeparttable (for footnotes) packages, =A0based on the suggestion= in section 13.2 of=A0http://orgmode.org/worg/org-tutorials/org-latex-export.h= tml=A0
It seems to do OK in a simple example, and I will test it some more. I= t does not export to html.
Thanks for your help.

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

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

=

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


On Fri, Dec 28, 2012 at 2:06 = PM, Thomas S. Dye <tsd@tsdye.com> 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. =A0You might want to experiment with alignment cookies in the table to see if they do what you want:

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

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

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

All the best,
Tom

=
--e89a8ff2534a6b726404d1f1bb2e--