From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Hendy Subject: Re: Confusion about attr_latex and new exporter Date: Sun, 17 Mar 2013 17:09:27 -0500 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([208.118.235.92]:53447) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UHLlj-0000Li-Aq for emacs-orgmode@gnu.org; Sun, 17 Mar 2013 18:09:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UHLlh-0002kE-Fm for emacs-orgmode@gnu.org; Sun, 17 Mar 2013 18:09:31 -0400 Received: from mail-la0-x236.google.com ([2a00:1450:4010:c03::236]:52244) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UHLlh-0002iB-66 for emacs-orgmode@gnu.org; Sun, 17 Mar 2013 18:09:29 -0400 Received: by mail-la0-f54.google.com with SMTP id gw10so5454171lab.27 for ; Sun, 17 Mar 2013 15:09:28 -0700 (PDT) In-Reply-To: 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: emacs-orgmode On Sun, Mar 17, 2013 at 4:57 PM, John Hendy wrote: > Just making the transition to the new exporter, finally, today. Just > some notes regarding the documentation that I wanted to pass along. I > think there's some possibly conflicting information (or at least > ambiguous) out there. > > - From the Worg page on transitioning to the new exporter > (http://orgmode.org/worg/org-8.0.html): > #+begin_quote > > Attribute lines now take plists: > #+attr_latex :width "5cm" > #+attr_beamer :options "width=5cm" > > #+end_quote > > However, from a previous email, I think a caveat should be added, as I > found the above misleading in trying my first test drive of the new > exporter. I recalled an earlier response on the mailing list to an > inquiry I had about the old exporter, which evolved into some > discussion about the new one: > - http://lists.gnu.org/archive/html/emacs-orgmode/2013-02/msg00850.html > > So, as this pertains to the transitioning guide: using =:width= as an > example of the new syntax is perhaps a bad idea since it's heavily > associated with #+attr_latex: width=Xcm for images and yet is > incorrect for image attributes. At the very least, some further > specification of the :width option should probably be referenced right > then and there. > > Another fantastic quote one might consider adding, which really helped > make things "click" for me is from the same thread a bit later: > - http://lists.gnu.org/archive/html/emacs-orgmode/2013-02/msg00882.html > > #+begin_quote Nicolas > > An argument within curly brackets gets its own keyword. Optional arguments > are stuffed within an `:options' keyword. > > #+end_quote > > That's quite helpful! > - \begin{tabular}{align=blah} --> :align "blah" (curly gets :keyword) > - \includegraphics[width=blah]{file.jpg} --> :options "width=blah" > (optional gets :options) > > Now, even having digested some of this a bit better, using any syntax > option (at least that I can tell is correct from the above) with > quotes yields quotes in the resulting .tex file and a resultant fail > of pdflatex compilation. > > In other words: > > - Org: > attr_latex: :options "width=5cm" > [[file.jpg]] > > - LaTeX: > \includegraphics["width=5cm"]{file.jpg} > > - Org > attr_latex: :align "lp{4cm}" > | column 1 | column 2 | > > - LaTeX: > \begin{tabular}{"lp{4cm}"} > > I also tried =:width "5cm"= for images. Despite this being options and > sounding like it needs to be in the :options string instead of :width, > it still works but quoted parts still get quotes =[width="5cm"]= in > the resultant .tex file. If I remove quotes, it works. That's fine, > but not sure if I'll ever run into any multi-word option occurrences > where I'll possibly need quotes to differentiate one set of option > values from another (don't think I've run into this before, but just > thinking out loud). > > Am I doing something wrong if this is the behavior I'm getting, or is > the documentation incorrect and I shouldn't be quoting these options? > > > Thanks, > John Sigh. Just when I thought I'd done my due diligence, I [re]found this: - http://comments.gmane.org/gmane.emacs.orgmode/68256 Which points to this: - http://comments.gmane.org/gmane.emacs.orgmode/68011 Talk about a fairly massive amount of time to discover that it's simply using the babel syntax =:width value= (no quotes). I'll state that the announcement (second link above) is still confusing to me, as Nicolas has stated: #+begin_quote >From the user POV, it removes necessity to quote or escape characters. For example, these are now valid: #+attr_latex: :font \footnotesize :align |l|c|c| #+attr_foo: :prop var="value" :another-prop nil #+end_quote Thus, I would have expected =#+attr_latex :options width="value"= to work, but it doesn't. Seems like :width is being treated specially, or did I just not parse =:prop var="value"= correctly? Thanks, John