emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: John Hendy <jw.hendy@gmail.com>
To: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Confusion about attr_latex and new exporter
Date: Sun, 17 Mar 2013 16:57:15 -0500	[thread overview]
Message-ID: <CA+M2ft_N1GwPi+xBuhs=C7Ykwe6=xo4REeXAuOacsJ4BXx4mGw@mail.gmail.com> (raw)

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

             reply	other threads:[~2013-03-17 21:57 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-17 21:57 John Hendy [this message]
2013-03-17 22:09 ` Confusion about attr_latex and new exporter John Hendy
2013-03-17 22:22 ` Thomas S. Dye
2013-03-18  0:28   ` John Hendy
2013-03-18  0:38     ` Thomas S. Dye
2013-03-19  4:51     ` Aaron Ecay
2013-03-19  5:07       ` Aaron Ecay
2013-03-19 14:49         ` John Hendy
2013-03-19 18:49           ` Bastien
2013-03-20 17:17             ` John Hendy
2013-03-19 17:52 ` Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CA+M2ft_N1GwPi+xBuhs=C7Ykwe6=xo4REeXAuOacsJ4BXx4mGw@mail.gmail.com' \
    --to=jw.hendy@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).