emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nick Dokos <ndokos@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: List of Figures not being generated in 8.0.3?
Date: Wed, 12 Jun 2013 13:21:50 -0400	[thread overview]
Message-ID: <87fvwn2qj5.fsf@pierrot.dokosmarshall.org> (raw)
In-Reply-To: 8761xjnx5t.fsf@ucl.ac.uk


Eric S Fraga <e.fraga@ucl.ac.uk> writes:

> Luke Crook <luke@balooga.com> writes:
>
>> I just noticed that the List of Figures is not being generated in 8.0.3.
>>
>> I have a figure with;
>>
>> #+LATEX: \listoffigures
>>
>> #+ATTR_LaTeX: width=5.5cm
>
> Maybe try with
>
> #+attr_latex: :width 5.5cm
>
> The format for attributes has changed in version 8 of org.

Although this might lead to a problem in how the figure appears on the
page, I believe the main problem was that there was no caption
associated with the image, so it was not put in a figure environment, it
was just inlined: inline images do not contribute to the list of
figures.

As Rasmus pointed out, #+caption was incorrectly associated with the
code block, rather than with the resulting image. The trick is to name
the code block and its results block, using the same name: that ties
them together, so that further execution of the code block does not
produce a new results block. Then you attach #+caption to the results
block:

,----
| #+name: foo
| #+begin_src ...
| ...
| #+end_src
| 
| #+caption: bar
| #+results: foo
| ....
`----

It used to be that the naming was mandatory: the intervening #+caption
line would cause babel to produce a new results block. ISTR that Nicolas
fixed it so that the naming is no longer necessary and babel will DTRT -
IOW, the following will work:

,----
| #+begin_src
| ...
| #+end_src
| 
| #+caption: bar
| #+results:
`----

I just checked btw, and it does work.

Org-mode version 8.0.3 (release_8.0.3-197-g221768 @ /home/nick/elisp/org-mode/lisp/)
-- 
Nick

  reply	other threads:[~2013-06-12 17:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-11 23:25 List of Figures not being generated in 8.0.3? Luke Crook
2013-06-11 23:58 ` Rasmus
2013-06-12 22:17   ` Luke Crook
2013-06-12 22:55   ` Luke Crook
2013-06-12 15:53 ` Eric S Fraga
2013-06-12 17:21   ` Nick Dokos [this message]
2013-06-13  7:46     ` Eric S Fraga
2013-06-13 13:50     ` Rasmus
2013-06-14  1:29       ` Luke Crook

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=87fvwn2qj5.fsf@pierrot.dokosmarshall.org \
    --to=ndokos@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).