emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nick Dokos <ndokos@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: How to populate a 'list of figures'?
Date: Wed, 07 Sep 2016 16:13:17 -0400	[thread overview]
Message-ID: <87y4338o4i.fsf@gmail.com> (raw)
In-Reply-To: 87vay7vcn1.fsf@skimble.plus.com

[-- Attachment #1: Type: text/plain, Size: 3380 bytes --]

Sharon Kimble <boudiccas@skimble.plus.com> writes:

> Peter Frings <peter.frings@agfa.com> writes:
>
>>> On 07 Sep 2016, at 12:52, Sharon Kimble <boudiccas@skimble.plus.com> wrote:
>>> 
>>> 
>>> I'm having great difficulty in being able to generate and populate a
>>> 'list of figures' in my orgmode-2-latex document. I currently have this
>>> as a figure in my org-mode file -
>>
>> [snip]
>>
>>> However, when I generate the pdf using xelatex all that it shows for my
>>> list of figures is 'List of Figures'!
>>> 
>>> So how can I get the list of figures to be populated please?
>>
>> To get the list of figures (or any other reference, for that matter), you have to typeset your
>> document twice. The first time, tex build a list of figures (in a separate file, with .lof
>> extension); the second time, it inserts that list where the \listoffigures{} is. This is common to
>> tex: you have to typeset twice to get the references and lists correct.
>>
>
> Thanks Peter. But I'm typesetting it at least three times. But its just
> not building the list of figures.
>
> However, if I run 'mklatex' on my source file it generates a 'foo.lof',
> but doesn't actually populate the 'list of figures'! And 'mklatex'
> doesn't finish either! But then I'm just learning how to actually use
> it.
>

I start with a lof.org file that looks like this (I deleted your citation
and changed the path of the image since I don't have either of those locally):

--8<---------------cut here---------------start------------->8---
#+LATEX: \listoffigures{}

* Foo

Some text.

#+CAPTION: The four principles of person-centred care 
#+ATTR_LaTeX: :width 0.5\textwidth :float t :placement [H]
#+LABEL: fig:four-principles
[[../images/one.png]]


Some more text.
* Bar
--8<---------------cut here---------------end--------------->8---

I exported and got this:

--8<---------------cut here---------------start------------->8---
% Created 2016-09-07 Wed 15:59
% Intended LaTeX compiler: pdflatex
\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{grffile}
\usepackage{longtable}
\usepackage{wrapfig}
\usepackage{rotating}
\usepackage[normalem]{ulem}
\usepackage{amsmath}
\usepackage{textcomp}
\usepackage{amssymb}
\usepackage{capt-of}
\usepackage{hyperref}
\usepackage{minted}
\author{Nick Dokos}
\date{\today}
\title{}
\hypersetup{
 pdfauthor={Nick Dokos},
 pdftitle={},
 pdfkeywords={},
 pdfsubject={},
 pdfcreator={Emacs 25.1.50.1 (Org mode 8.3.5)}, 
 pdflang={English}}
\begin{document}

\tableofcontents

\listoffigures{}

\section{Foo}
\label{sec:org8f4d5cc}

Some text.

\begin{figure}[H]
\centering
\includegraphics[width=0.5\textwidth]{../images/one.png}
\caption{\label{fig:org0cc86dc}
The four principles of person-centred care}
\end{figure}


Some more text.
\section{Bar}
\label{sec:orgb6d5c42}
\end{document}
--8<---------------cut here---------------end--------------->8---

Then xelatex'ed twice (shell escape is for minted - you may not need it):

   xelatex --shell-escape lof.tex
   # at this point, lof.lof and lof.toc exist and lof.lof contains
   # \contentsline {figure}{\numberline {1}{\ignorespaces The four principles of person-centred care}}{1}{figure.1}
   # then again to incorporate them into the output
   xelatex --shell-escape lof.tex

The list of figures is present and complete (see attached PDF).


[-- Attachment #2: lof.pdf --]
[-- Type: application/pdf, Size: 617036 bytes --]

[-- Attachment #3: Type: text/plain, Size: 71 bytes --]


If that does not work for you, where exactly does it break?

-- 
Nick

  reply	other threads:[~2016-09-07 20:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-07 10:52 How to populate a 'list of figures'? Sharon Kimble
2016-09-07 13:36 ` Peter Frings
2016-09-07 15:02   ` Sharon Kimble
2016-09-07 20:13     ` Nick Dokos [this message]
2016-09-14 17:32       ` Sharon Kimble
2016-09-14 18:53         ` Nick Dokos

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=87y4338o4i.fsf@gmail.com \
    --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).