emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [Orgmode] Org and LaTeX tables


From: Carsten Dominik
Subject: Re: [Orgmode] Org and LaTeX tables
Date: Wed, 6 Jan 2010 11:43:58 +0100


On Jan 6, 2010, at 11:29 AM, Sébastien Vauban wrote:

* Context

In the PDF output, I need to have tables somehow highlighted. For example,
 by placing a border around them, or by putting a background color.

Some months ago, I did that by using =org-special-blocks=, such in the
 following example:

#+BEGIN_shaded
 |   Code |    1st |    2nd |
 |--------+--------+--------|
 | 361-94 | 830.00 | 830.00 |
 | 364-91 |   0.00 | 347.00 |
#+END_shaded

But =org-special-blocks= turns out to be incompatible with Org- babel, and
 since the latter grows in importance...


* Essays

All of the following essays fail, in that the tables are copied verbatim in the TeX output file. That is, the columns are not replaced by the 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 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 à 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 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

--
Sébastien Vauban



_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
address@hidden
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

- Carsten







reply via email to

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