emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carsten Dominik <carsten.dominik@gmail.com>
To: "Sébastien Vauban" <wxhgmqzgwmuf@spammotel.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Org and LaTeX tables
Date: Wed, 6 Jan 2010 11:43:58 +0100	[thread overview]
Message-ID: <F537C35D-09F7-49D0-80A5-6242CB72411C@gmail.com> (raw)
In-Reply-To: <87d41nplun.fsf@mundaneum.com>


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.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

- Carsten

  reply	other threads:[~2010-01-06 10:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-06 10:29 Org and LaTeX tables Sébastien Vauban
2010-01-06 10:43 ` Carsten Dominik [this message]
2010-01-06 11:10   ` Sébastien Vauban
2010-01-06 13:27     ` Carsten Dominik
2010-01-06 15:42       ` Eric Schulte
2010-01-20 13:45       ` Sébastien Vauban

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=F537C35D-09F7-49D0-80A5-6242CB72411C@gmail.com \
    --to=carsten.dominik@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=wxhgmqzgwmuf@spammotel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).