emacs-orgmode
[Top][All Lists]

## [Orgmode] Re: LaTeX export bugs?

 From: Sébastien Vauban Subject: [Orgmode] Re: LaTeX export bugs? Date: Mon, 06 Jul 2009 22:31:04 +0200 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.94 (gnu/linux)

Hi all,

Carsten Dominik wrote:
> Sébastien Vauban wrote:
>> Carsten Dominik wrote:
>>> Sébastien Vauban wrote:
>> [This is not working...]
>>
--8<---------------cut here---------------start------------->8---
#+LaTeX: \begin{framed}
#+ATTR_LaTeX: align=lrrr
| Code      | \euro{} |  \% | \euro{} |
|-----------+---------+-----+---------|
| GSM       |         |     |    0.00 |
| Internet  |  168.45 | 100 |  168.45 |
| Matériel  |  295.99 | 100 |  295.99 |
| Publicité |  214.25 |  33 |   70.70 |
| Autres    |         |     |    0.00 |
|-----------+---------+-----+---------|
| Total     |         |     |  535.14 |
#+TBLFM: $4=$2*$3/100;%.2f::@7$4=vsum(@address@hidden)
#+LaTeX: \end{framed}
--8<---------------cut here---------------end--------------->8---
>>
>> Am I misunderstanding section 12.7.2 or is this a feature?
>
> This does not work. What is happening here is that during LaTeX export,
> these begin/end lines are inserted into the buffer. Then the LaTeX exporter
> marks the entire content of this environment as something that should be
> exported literally to LaTeX, this is why you can write
>
>
> a=b
>
>
> and it will all be exported literally to LaTeX.
>
> The fact that the table is transformed into a LaTeX table at all is actually
> a bug which I will fix.

I'm not sure I understand what's the impact of your last sentence. But, maybe,
I don't have too...

Related to this:

>> Now, more important question, one of the few that's not answered from my
>> previous post: how can I shade or frame a table? For me, inserting #+LaTeX
>> tags is different from inserting #+BEGIN_LaTeX and #+END_LaTeX tags: the
>> first one should have no impact on the rest of the text.

Rephrasing my question, asking it again in other words (showing you I did not

--8<---------------cut here---------------start------------->8---
#+BEGIN_framed
XXX
#+END_framed
--8<---------------cut here---------------end--------------->8---

is equivalent to:

--8<---------------cut here---------------start------------->8---
#+LaTeX: \begin{framed}
XXX
#+LaTeX: \end{framed}
--8<---------------cut here---------------end--------------->8---

If not, that's not what I understand from reading section 12.7.2 about the
quoting of LaTeX code?  Though, it seems (seemed) clear...

> So there is not really a standard way to do what you want.
>
> However, you could take a look as Chris Gray's contributes package
> org-special-blocks.el
>
>    http://orgmode.org/worg/org-contrib/org-special-blocks.php
>
> which was made just for this use case.

Excellent. Tested. Work perfectly, except for:

>>>> - Even with version 6.28, the #+TBLNAME' tag must be located in column 0
>>>> (at least, for the highlighting features to work)
>>>
>>> Fixed, thanks.

Same problem with the Org-special-blocks constructs: they need to be declared
in column 0; otherwise, they're just ignored...

A detail, though: putting my table in a framed' block makes the highlighting
of the keywords such as TBLNAME and TBLFM disappear...

Best regards,
Seb

PS- Hoping desperately Org-mode will win!

--
Sébastien Vauban