From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Org and LaTeX tables Date: Wed, 6 Jan 2010 11:43:58 +0100 Message-ID: References: <87d41nplun.fsf@mundaneum.com> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NSTN2-0000BJ-D1 for emacs-orgmode@gnu.org; Wed, 06 Jan 2010 05:44:08 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NSTMx-0008Uy-3o for emacs-orgmode@gnu.org; Wed, 06 Jan 2010 05:44:07 -0500 Received: from [199.232.76.173] (port=43923 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NSTMw-0008UZ-TX for emacs-orgmode@gnu.org; Wed, 06 Jan 2010 05:44:02 -0500 Received: from mail-ew0-f224.google.com ([209.85.219.224]:59032) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NSTMw-0008TW-C5 for emacs-orgmode@gnu.org; Wed, 06 Jan 2010 05:44:02 -0500 Received: by ewy24 with SMTP id 24so20204167ewy.26 for ; Wed, 06 Jan 2010 02:44:01 -0800 (PST) In-Reply-To: <87d41nplun.fsf@mundaneum.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: =?ISO-8859-1?Q?S=E9bastien_Vauban?= Cc: emacs-orgmode@gnu.org On Jan 6, 2010, at 11:29 AM, S=E9bastien Vauban wrote: > * Context > > In the PDF output, I need to have tables somehow highlighted. For =20 > example, > by placing a border around them, or by putting a background color. > > Some months ago, I did that by using =3Dorg-special-blocks=3D, such = in =20 > the > following example: > > #+BEGIN_shaded > | Code | 1st | 2nd | > |--------+--------+--------| > | 361-94 | 830.00 | 830.00 | > | 364-91 | 0.00 | 347.00 | > #+END_shaded > > But =3Dorg-special-blocks=3D turns out to be incompatible with Org-=20= > babel, and > since the latter grows in importance... > > > * Essays > > All of the following essays fail, in that the tables are copied =20 > verbatim in > the TeX output file. That is, the columns are not replaced by the =20 > correct > code (with ampersand as separator). > > ** Embedding LaTeX > > \begin{shaded} > | Code | 1st | 2nd | > |--------+--------+--------| > | 361-94 | 830.00 | 830.00 | > | 364-91 | 0.00 | 347.00 | > \end{shaded} The content of an environment will be exported literally. > > > ** Quoting LaTeX code > > #+LaTeX: \begin{shaded} > | Code | 1st | 2nd | > |--------+--------+--------| > | 361-94 | 830.00 | 830.00 | > | 364-91 | 0.00 | 347.00 | > #+LaTeX: \end{shaded} Here is a dirty trick that might work. Environments are only detected =20= if they are the first thing in a new line: #+LaTeX: {}\begin{shaded} | Code | 1st | 2nd | |--------+--------+--------| | 361-94 | 830.00 | 830.00 | | 364-91 | 0.00 | 347.00 | #+LaTeX: \end{shaded} HTH - Carsten > > > ** Quoting LaTeX code =E0 la Org-babel? > > #+BEGIN_SRC shaded > | Code | 1st | 2nd | > |--------+--------+--------| > | 361-94 | 830.00 | 830.00 | > | 364-91 | 0.00 | 347.00 | > #+END_SRC > > > ** Alternatives... > > Is there any other working alternative to get the power of Org =20 > tables and > LaTeX code surrounding them, in order to get this: > > \begin{shaded} > \begin{tabular}{rrr} > Code & 1st & 2nd \\ > \hline > 361-94 & 830.00 & 830.00 \\ > 364-91 & 0.00 & 347.00 \\ > \end{tabular} > \end{shaded} > > Best regards, > Seb > > --=20 > S=E9bastien Vauban > > > > _______________________________________________ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode - Carsten