From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: List of Figures not being generated in 8.0.3? Date: Wed, 12 Jun 2013 13:21:50 -0400 Message-ID: <87fvwn2qj5.fsf@pierrot.dokosmarshall.org> References: <8761xjnx5t.fsf@ucl.ac.uk> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56573) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UmokM-0006Mh-HZ for emacs-orgmode@gnu.org; Wed, 12 Jun 2013 13:22:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UmokH-0006c1-6d for emacs-orgmode@gnu.org; Wed, 12 Jun 2013 13:22:10 -0400 Received: from plane.gmane.org ([80.91.229.3]:52493) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UmokH-0006bC-0L for emacs-orgmode@gnu.org; Wed, 12 Jun 2013 13:22:05 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UmokF-0000JJ-Jk for emacs-orgmode@gnu.org; Wed, 12 Jun 2013 19:22:03 +0200 Received: from pool-108-7-96-134.bstnma.fios.verizon.net ([108.7.96.134]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 12 Jun 2013 19:22:03 +0200 Received: from ndokos by pool-108-7-96-134.bstnma.fios.verizon.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 12 Jun 2013 19:22:03 +0200 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@gnu.org Eric S Fraga writes: > Luke Crook 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