From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Re: LaTeX export bugs? Date: Fri, 3 Jul 2009 06:36:39 +0200 Message-ID: <81A4AEEC-8843-4D86-89F5-31227882A9D4@gmail.com> References: <87vdmjglto.fsf@mundaneum.com> <874otwduhr.fsf@mundaneum.com> <13C7ED92-A0C1-40E0-873A-F6A9143167DB@gmail.com> <87skhehl7w.fsf@mundaneum.com> Mime-Version: 1.0 (Apple Message framework v935.3) 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 1MMaW1-0002Pf-IG for emacs-orgmode@gnu.org; Fri, 03 Jul 2009 00:36:49 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MMaVw-0002PT-30 for emacs-orgmode@gnu.org; Fri, 03 Jul 2009 00:36:48 -0400 Received: from [199.232.76.173] (port=54479 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MMaVv-0002PQ-UO for emacs-orgmode@gnu.org; Fri, 03 Jul 2009 00:36:43 -0400 Received: from mail-ew0-f208.google.com ([209.85.219.208]:49010) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MMaVv-0005yB-Dw for emacs-orgmode@gnu.org; Fri, 03 Jul 2009 00:36:43 -0400 Received: by ewy4 with SMTP id 4so2630246ewy.42 for ; Thu, 02 Jul 2009 21:36:42 -0700 (PDT) In-Reply-To: <87skhehl7w.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 Jul 2, 2009, at 10:40 PM, S=E9bastien Vauban wrote: > Hi Carsten, > > Carsten Dominik wrote: >> S=E9bastien Vauban wrote: >>> Other things I've noticed: >>> >>> - Even with version 6.28, the `#+TBLNAME' tag must be located in =20 >>> column 0 >>> (at least, for the highlighting features to work) >> >> Fixed, thanks. > > Euh, no, *I* am supposed to answer: "Fixed, thanks", and I'm doing =20 > it... ;-) The "thanks" is short for "thanks for your report/idea" :-) > > >>> - Remote references to other tables are great, but they only work =20= >>> with >>> absolute references, not with named cells. >> >> They actually do work fine. A call like remote(mytbl,$name) will =20 >> work >> in this table >> >> | _ | name | >> | | value | > > OK. I did not understand from the doc (section 3.5.1) that I had to =20= > prefix the > name of the cell with $: > > "REF is an absolute field [...] as described above." > > I admit that, knowing it, I understand the above text better. Maybe =20= > is such > an example missing? Fixed, thanks. > > Now, more important question, one of the few that's not answered =20 > from my > previous post: how can I shade or frame a table? For me, inserting #=20= > +LaTeX > tags is different from inserting #+BEGIN_LaTeX and #+END_LaTeX tags: =20= > the first > one should have no impact on the rest of the text. > > Though, it isn't as you can see with my following example: > > --8<---------------cut here---------------start------------->8--- > #+LaTeX: \begin{framed} > #+ATTR_LaTeX: align=3Dlrrr > | Code | \euro{} | \% | \euro{} | > |-----------+---------+-----+---------| > | GSM | | | 0.00 | > | Internet | 168.45 | 100 | 168.45 | > | Mat=E9riel | 295.99 | 100 | 295.99 | > | Publicit=E9 | 214.25 | 33 | 70.70 | > | Autres | | | 0.00 | > |-----------+---------+-----+---------| > | Total | | | 535.14 | > #+TBLFM: $4=3D$2*$3/100;%.2f::@7$4=3Dvsum(@-I..@-II) > #+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 \begin{equation} a=3Db \end{equation} 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. 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. Another workaround (hack, really) would be #+LATEX_HEADER: \def\noop{} \noop\begin{framed} ... \noop\end{framed} This will trick Org-mode by not having the \begin macro at the beginning of a line, so it will not protect the content of the environment. Dirty, but works. HTH - Carsten