From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Fraga Subject: Re: LaTeX export -- Table with align option Date: Tue, 5 Jun 2012 20:54:25 +0930 Message-ID: <87wr3mq9w6.fsf@ucl.ac.uk> References: <80fwaavnja.fsf@somewhere.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:53649) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SbrsU-00014Y-Sk for emacs-orgmode@gnu.org; Tue, 05 Jun 2012 07:24:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SbrsS-0002Oa-S7 for emacs-orgmode@gnu.org; Tue, 05 Jun 2012 07:24:46 -0400 Received: from va3ehsobe001.messaging.microsoft.com ([216.32.180.11]:25588 helo=va3outboundpool.messaging.microsoft.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SbrsS-0002Mt-O0 for emacs-orgmode@gnu.org; Tue, 05 Jun 2012 07:24:44 -0400 In-Reply-To: <80fwaavnja.fsf@somewhere.org> (Sebastien Vauban's message of "Mon, 4 Jun 2012 22:18:33 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Sebastien Vauban Cc: emacs-orgmode@gnu.org Sebastien Vauban writes: > Hello, > > I want to customize a bit the layout of a table, using the =align= parameter as > explained on http://orgmode.org/manual/Tables-in-LaTeX-export.html. > > That works well for the first two common usages (see ECM) but not with > @-expressions (see, for example, on Actually, it's not the @ expressions as such that cause the problems, it's the spaces you are trying to introduce within them, causing the org parser to terminate the alignment term too soon. Two solutions below. [...] > #+ATTR_LaTeX: align=r@{ : }r@{ }l [...] > gets INCORRECTLY translated to: > > #+begin_src latex > \begin{tabular}{r@{} [...] I know this isn't pretty but you could use #+ATTR_LaTeX: align=r@{\hspace{1em}:\hspace{1em}}r@{\hspace{1em}}l changing the 1em to whatever amount of space you actually want; probably 1ex is more likely... The following also works but although it looks simpler here (in an email), I don't like how Org hides the ~s in the first column specification as it (incorrectly) interprets them as a verbatim style. #+ATTR_LaTeX: align=r@{~:~}r@{~}l HTH, eric -- : Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.1.50.1 : using Org release_7.8.11-14-g4b0121