From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Align argument in #+attr_latex for tabular env. is whitespace sensitive Date: Tue, 12 Feb 2013 20:44:51 +0100 Message-ID: <87vc9x9v0s.fsf@gmail.com> References: <87d2w5ban3.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:56428) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U5Lmw-0003eW-87 for emacs-orgmode@gnu.org; Tue, 12 Feb 2013 14:45:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U5Lmt-0000Ab-Ni for emacs-orgmode@gnu.org; Tue, 12 Feb 2013 14:45:10 -0500 Received: from mail-wi0-f172.google.com ([209.85.212.172]:34709) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U5Lmt-00008s-HG for emacs-orgmode@gnu.org; Tue, 12 Feb 2013 14:45:07 -0500 Received: by mail-wi0-f172.google.com with SMTP id ez12so4867601wid.5 for ; Tue, 12 Feb 2013 11:45:06 -0800 (PST) In-Reply-To: (John Hendy's message of "Tue, 12 Feb 2013 13:40:10 -0600") 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: John Hendy Cc: emacs-orgmode John Hendy writes: > On Tue, Feb 12, 2013 at 1:22 PM, Nicolas Goaziou wrote: >> Hello, >> >> John Hendy writes: >> >>> Was not getting the results I expected from #+attr_latex, so I created >>> a simplified table to test: >>> >>> #+begin_src org >>> >>> Centered (will be sent to LaTeX as =\begin{tabular}{cc}=: >>> >>> #+attr_latex: align=cc >>> | test | test | >>> | test of longer | test | >>> >>> Left aligned (will be sent to LaTeX as =\begin{tabular}{ll}=: >>> >>> #+attr_latex: align = cc >>> | test | test | >>> | test of longer | test | >>> >>> #+end_src >>> >>> If there's reason for this, I can change my habits. I guess from >>> various tidy programming habits, I'm just in the practice of >>> separating equal signs with surrounding white space for easier >>> readability. For what it's worth, these two behave identically: >>> >>> #+attr_latex: width=5cm >>> #+attr_latex: width = 5cm >>> >>> I'm not sure why the tabular align argument is behaving differently. >> >> This syntax is wrong anyway. It should be: >> >> #+attr_latex: :width "5cm" >> >> or >> >> #+attr_latex: :width 5cm >> >> The same goes for :align. Also, for simple alignment strings, you can >> provide align cookies within the table. > > Ah. Very good to know. Is this documented? It was only announced on this ML. > This is the syntax I use for babel blocks, but I've never seen it for > #+attr_latex. The manual also doesn't show any =:option "value"= > methods, at least in my initial peruse: > - http://orgmode.org/manual/Tables-in-LaTeX-export.html > - http://orgmode.org/manual/Images-in-LaTeX-export.html#Images-in-LaTeX-export > > It's all in `option=value` format. > > Is your syntax (including the comment about cookies, as I haven't seen > that in the org manual either) relevant for the old exporter, or only > the new one? As I said, this is using the old exporter and I haven't > migrated over yet... The Babel-like syntax is only relevant for the new exporter. The old exporter had some support for align cookies in table (depending on the back-end). Regards, -- Nicolas Goaziou