emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Mark Edgington <edgimar@gmail.com>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: Comment lines interfere with figure options
Date: Fri, 30 Oct 2015 14:56:18 +0100	[thread overview]
Message-ID: <87io5ov4sd.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <CAMsBe8ps75pBhDWbVmKT0pQ9fk+9QCTQhZqhyEYiG3yCZhrYiw@mail.gmail.com> (Mark Edgington's message of "Fri, 30 Oct 2015 08:23:16 -0400")

Hello,

Mark Edgington <edgimar@gmail.com> writes:

> If I have some org-mode content that looks like this...
>
> #+NAME: fig-myimage
> #+CAPTION: Caption of Figure
> #+ATTR_LaTeX: :width 5cm
> #+RESULTS: myimage
> [[file:images/myimage.png]]
>
> then I get a centered figure with the appropriate width and caption
> when exporting to LaTeX.  If, however, I add a comment (or two)
> in-between one of the option-lines...
>
> #+NAME: fig-myimage
> #+CAPTION: Caption of Figure
> # (this was the original width)
> # +ATTR_LaTeX: width 10cm
> #+ATTR_LaTeX: :width 5cm
> #+RESULTS: myimage
> [[file:images/myimage.png]]
>
> then all of the settings above the comments are lost.  Would it be
> difficult to modify org-mode so that comment-lines are ignored when
> looking for a block of settings lines that precede an image?

It means introducing a special cases for comments (i.e.,
comments-in-attributes). I'm not a big fan of special cases.

However you can comment the attribute above the block, e.g.,

  # (this was the original width)
  # +ATTR_LaTeX: width 10cm
  #+NAME: fig-myimage
  #+CAPTION: Caption of Figure
  #+ATTR_LaTeX: :width 5cm
  #+RESULTS: myimage
  [[file:images/myimage.png]]

It is very easy to do with M-S-up/down, considering you probably don't
have a screenful of attributes for the same block.


Regards,

-- 
Nicolas Goaziou

      reply	other threads:[~2015-10-30 13:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-30 12:23 Comment lines interfere with figure options Mark Edgington
2015-10-30 13:56 ` Nicolas Goaziou [this message]

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=87io5ov4sd.fsf@nicolasgoaziou.fr \
    --to=mail@nicolasgoaziou.fr \
    --cc=edgimar@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).