emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] How to populate a 'list of figures'?


From: Sharon Kimble
Subject: Re: [O] How to populate a 'list of figures'?
Date: Wed, 14 Sep 2016 18:32:31 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

Nick Dokos <address@hidden> writes:

> Sharon Kimble <address@hidden> writes:
>
>> Peter Frings <address@hidden> writes:
>>
>>>> On 07 Sep 2016, at 12:52, Sharon Kimble <address@hidden> 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.
>>
>

Thanks for this Nick, here is the first part of my reply, a preliminary 
feed-back.

> 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):
>
> #+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
>
>
> I exported and got this:
>
> % 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}
>
> 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).
>

Your setup is working as you say even though I'm using the report class,
and it *does* generate the list of figures.

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

But I am using the 'my-report' class which is defined as this in my init.org 
file.

--8<---------------cut here---------------start------------->8---
(add-to-list 'org-latex-classes
             '("my-report"
               "\\documentclass{report}
               [NO-DEFAULT-PACKAGES]"
               ("\\chapter{%s}" . "\\chapter*{%s}")
               ("\\section{%s}" . "\\section*{%s}")
               ("\\subsection{%s}" . "\\subsection*{%s}")
               ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
               ("\\paragraph{%s}" . "\\paragraph*{%s}")
               ("\\subparagraph{%s}" . "\\subparagraph*{%s}")))
--8<---------------cut here---------------end--------------->8---

Using this class my main working file is exported and built into 395
pages, however if I use the 'report' class it works out to about 483
pages.

Using just the 'report' class it does generate a '*.lof' file, and this is it -

--8<---------------cut here---------------start------------->8---
\boolfalse {citerequest}\boolfalse {citetracker}\boolfalse 
{pagetracker}\boolfalse {backtracker}\relax
\defcounter {refsection}{0}\relax
\contentsline {xpart}{Preface}{6}{part.1}
\defcounter {refsection}{0}\relax
\addvspace {10\p@ }
\defcounter {refsection}{0}\relax
\contentsline {xchapter}{Disclaimer}{7}{chapter.1}
\defcounter {refsection}{0}\relax
\addvspace {10\p@ }
\defcounter {refsection}{0}\relax
\contentsline {xchapter}{Acknowledgements}{8}{chapter.2}
\defcounter {refsection}{0}\relax
\addvspace {10\p@ }
\defcounter {refsection}{0}\relax
\contentsline {xchapter}{Creative Commons}{9}{chapter.3}
\defcounter {refsection}{0}\relax
\addvspace {10\p@ }
\defcounter {refsection}{0}\relax
\contentsline {xchapter}{About the author}{11}{chapter.4}
\defcounter {refsection}{0}\relax
\addvspace {10\p@ }
\defcounter {refsection}{0}\relax
\contentsline {xchapter}{Why I wrote this book}{12}{chapter.5}
\defcounter {refsection}{0}\relax
\contentsline {xpart}{Introduction}{14}{part.2}
\defcounter {refsection}{0}\relax
\addvspace {10\p@ }
\defcounter {refsection}{0}\relax
\contentsline {xchapter}{What is palliative care?}{15}{chapter.6}
\defcounter {refsection}{0}\relax
\addvspace {10\p@ }
\defcounter {refsection}{0}\relax
\contentsline {xchapter}{What is end of life care?}{18}{chapter.7}
\defcounter {refsection}{0}\relax
\addvspace {10\p@ }
\defcounter {refsection}{0}\relax
\contentsline {xchapter}{What is person-centred care?}{29}{chapter.8}
\defcounter {refsection}{0}\relax
\contentsline {figure}{\numberline {8.1}{\ignorespaces The four principles of 
person-centred care \parencite {0055}\relax }}{30}{figure.caption.25}
\defcounter {refsection}{0}\relax
\addvspace {10\p@ }
\defcounter {refsection}{0}\relax
\contentsline {xchapter}{What is 'dignity'?}{31}{chapter.9}
\defcounter {refsection}{0}\relax
\addvspace {10\p@ }
\defcounter {refsection}{0}\relax
\contentsline {xchapter}{The multi-disciplinary care team}{32}{chapter.10}
\defcounter {refsection}{0}\relax
\addvspace {10\p@ }
\defcounter {refsection}{0}\relax
\contentsline {xchapter}{Useful organisations or websites}{38}{chapter.11}
\defcounter {refsection}{0}\relax
\contentsline {xpart}{Planning ahead}{41}{part.3}
\defcounter {refsection}{0}\relax
\contentsline {xpart}{Planning Ahead}{42}{part.4}
\defcounter {refsection}{0}\relax
\addvspace {10\p@ }
\defcounter {refsection}{0}\relax
\contentsline {xchapter}{Dealing with the news}{42}{chapter.12}
\defcounter {refsection}{0}\relax
\addvspace {10\p@ }
\defcounter {refsection}{0}\relax
\contentsline {xchapter}{Why plan ahead?}{62}{chapter.13}
\defcounter {refsection}{0}\relax
\addvspace {10\p@ }
\defcounter {refsection}{0}\relax
\contentsline {xchapter}{Planning ahead}{63}{chapter.14}
\defcounter {refsection}{0}\relax
\addvspace {10\p@ }
\defcounter {refsection}{0}\relax
\contentsline {xchapter}{Planning ahead for the end of life}{92}{chapter.15}
\defcounter {refsection}{0}\relax
\addvspace {10\p@ }
\defcounter {refsection}{0}\relax
\contentsline {xchapter}{Advance care plans}{97}{chapter.16}
\defcounter {refsection}{0}\relax
\addvspace {10\p@ }
\defcounter {refsection}{0}\relax
\contentsline {xchapter}{Talking about death and dying}{99}{chapter.17}
\defcounter {refsection}{0}\relax
\addvspace {10\p@ }
\defcounter {refsection}{0}\relax
\contentsline {xchapter}{DNAR forms}{105}{chapter.18}
\defcounter {refsection}{0}\relax
\addvspace {10\p@ }
\defcounter {refsection}{0}\relax
\contentsline {xchapter}{Lasting power of attorney}{107}{chapter.19}
\defcounter {refsection}{0}\relax
\addvspace {10\p@ }
\defcounter {refsection}{0}\relax
\contentsline {xchapter}{Should I make a lasting power of attorney or an 
advance decision, or both?}{110}{chapter.20}
\defcounter {refsection}{0}\relax
\contentsline {xpart}{End of life care}{113}{part.5}
\defcounter {refsection}{0}\relax
\contentsline {xpart}{End of life care}{114}{part.6}
\defcounter {refsection}{0}\relax
\addvspace {10\p@ }
\defcounter {refsection}{0}\relax
\contentsline {xchapter}{Ten practical needs of patients and their 
families}{114}{chapter.21}
\defcounter {refsection}{0}\relax
\addvspace {10\p@ }
\defcounter {refsection}{0}\relax
\contentsline {xchapter}{Day to day caring}{116}{chapter.22}
\defcounter {refsection}{0}\relax
\addvspace {10\p@ }
\defcounter {refsection}{0}\relax
\contentsline {xchapter}{As our bodies die\ldots {}}{132}{chapter.23}
\defcounter {refsection}{0}\relax
\addvspace {10\p@ }
\defcounter {refsection}{0}\relax
\contentsline {xchapter}{Preparing for the end of life - information for 
carers}{135}{chapter.24}
\defcounter {refsection}{0}\relax
\addvspace {10\p@ }
\defcounter {refsection}{0}\relax
\contentsline {xchapter}{The last few weeks of life}{143}{chapter.25}
\defcounter {refsection}{0}\relax
\addvspace {10\p@ }
\defcounter {refsection}{0}\relax
\contentsline {xchapter}{Signs that death is near}{156}{chapter.26}
\defcounter {refsection}{0}\relax
\addvspace {10\p@ }
\defcounter {refsection}{0}\relax
\contentsline {xchapter}{Changes in the last days of life}{158}{chapter.27}
\defcounter {refsection}{0}\relax
\addvspace {10\p@ }
\defcounter {refsection}{0}\relax
\contentsline {xchapter}{Practicalities to think about when someone is 
dying}{165}{chapter.28}
\defcounter {refsection}{0}\relax
\addvspace {10\p@ }
\defcounter {refsection}{0}\relax
\contentsline {xchapter}{At the bedside}{167}{chapter.29}
\defcounter {refsection}{0}\relax
\addvspace {10\p@ }
\defcounter {refsection}{0}\relax
\contentsline {xchapter}{The spiritual aspects of death}{169}{chapter.30}
\defcounter {refsection}{0}\relax
\addvspace {10\p@ }
\defcounter {refsection}{0}\relax
\contentsline {xchapter}{Family dynamics when someone is dying}{171}{chapter.31}
\defcounter {refsection}{0}\relax
\addvspace {10\p@ }
\defcounter {refsection}{0}\relax
\contentsline {xchapter}{Being with someone when they die}{173}{chapter.32}
\defcounter {refsection}{0}\relax
\contentsline {xpart}{After death}{179}{part.7}
\defcounter {refsection}{0}\relax
\contentsline {xpart}{Post death}{180}{part.8}
\defcounter {refsection}{0}\relax
\addvspace {10\p@ }
\defcounter {refsection}{0}\relax
\contentsline {xchapter}{Checklist}{180}{chapter.33}
\defcounter {refsection}{0}\relax
\addvspace {10\p@ }
\defcounter {refsection}{0}\relax
\contentsline {xchapter}{What to do when someone dies in 
hospital}{184}{chapter.34}
\defcounter {refsection}{0}\relax
\addvspace {10\p@ }
\defcounter {refsection}{0}\relax
\contentsline {xchapter}{What to do when someone dies at home or in a care 
home}{186}{chapter.35}
\defcounter {refsection}{0}\relax
\addvspace {10\p@ }
\defcounter {refsection}{0}\relax
\contentsline {xchapter}{What to do when someone dies in a public 
place}{188}{chapter.36}
\defcounter {refsection}{0}\relax
\addvspace {10\p@ }
\defcounter {refsection}{0}\relax
\contentsline {xchapter}{What to do after someone dies}{189}{chapter.37}
\defcounter {refsection}{0}\relax
\addvspace {10\p@ }
\defcounter {refsection}{0}\relax
\contentsline {xchapter}{Step by step checklist}{203}{chapter.38}
\defcounter {refsection}{0}\relax
\addvspace {10\p@ }
\defcounter {refsection}{0}\relax
\contentsline {xchapter}{Medical Certificate of Cause of Death}{204}{chapter.39}
\defcounter {refsection}{0}\relax
\contentsline {xpart}{Arranging a Funeral}{207}{part.9}
\defcounter {refsection}{0}\relax
\addvspace {10\p@ }
\defcounter {refsection}{0}\relax
\contentsline {xchapter}{Choosing a funeral director}{207}{chapter.40}
\defcounter {refsection}{0}\relax
\addvspace {10\p@ }
\defcounter {refsection}{0}\relax
\contentsline {xchapter}{Arranging a funeral without a funeral 
director}{209}{chapter.41}
\defcounter {refsection}{0}\relax
\addvspace {10\p@ }
\defcounter {refsection}{0}\relax
\contentsline {xchapter}{Planning a cremation}{210}{chapter.42}
\defcounter {refsection}{0}\relax
\addvspace {10\p@ }
\defcounter {refsection}{0}\relax
\contentsline {xchapter}{Funeral costs}{214}{chapter.43}
\defcounter {refsection}{0}\relax
\addvspace {10\p@ }
\defcounter {refsection}{0}\relax
\contentsline {xchapter}{Planning a burial}{217}{chapter.44}
\defcounter {refsection}{0}\relax
\addvspace {10\p@ }
\defcounter {refsection}{0}\relax
\contentsline {xchapter}{Funeral paperwork}{221}{chapter.45}
\defcounter {refsection}{0}\relax
\addvspace {10\p@ }
\defcounter {refsection}{0}\relax
\contentsline {xchapter}{Funeral costs}{224}{chapter.46}
\defcounter {refsection}{0}\relax
\addvspace {10\p@ }
\defcounter {refsection}{0}\relax
\contentsline {xchapter}{Funeral plans}{228}{chapter.47}
\defcounter {refsection}{0}\relax
\addvspace {10\p@ }
\defcounter {refsection}{0}\relax
\contentsline {xchapter}{Coping with bereavement}{229}{chapter.48}
\defcounter {refsection}{0}\relax
\addvspace {10\p@ }
\defcounter {refsection}{0}\relax
\contentsline {xchapter}{Coping with grief}{233}{chapter.49}
\defcounter {refsection}{0}\relax
\addvspace {10\p@ }
\defcounter {refsection}{0}\relax
\contentsline {xchapter}{Telling others about a death}{237}{chapter.50}
\defcounter {refsection}{0}\relax
\addvspace {10\p@ }
\defcounter {refsection}{0}\relax
\contentsline {xchapter}{Check for important paperwork}{240}{chapter.51}
\defcounter {refsection}{0}\relax
\addvspace {10\p@ }
\defcounter {refsection}{0}\relax
\contentsline {xchapter}{Coping with the media}{242}{chapter.52}
\defcounter {refsection}{0}\relax
\addvspace {10\p@ }
\defcounter {refsection}{0}\relax
\contentsline {xchapter}{What if you are not the next of kin?}{244}{chapter.53}
\defcounter {refsection}{0}\relax
\addvspace {10\p@ }
\defcounter {refsection}{0}\relax
\contentsline {xchapter}{Bereavement services}{245}{chapter.54}
\defcounter {refsection}{0}\relax
\addvspace {10\p@ }
\defcounter {refsection}{0}\relax
\contentsline {xchapter}{Registering a death and arranging a 
funeral}{248}{chapter.55}
\defcounter {refsection}{0}\relax
\addvspace {10\p@ }
\defcounter {refsection}{0}\relax
\contentsline {xchapter}{Managing the estate}{249}{chapter.56}
\defcounter {refsection}{0}\relax
\addvspace {10\p@ }
\defcounter {refsection}{0}\relax
\contentsline {xchapter}{Useful websites for arranging a 
funeral}{250}{chapter.57}
\defcounter {refsection}{0}\relax
\contentsline {xpart}{Everything in depth}{253}{part.10}
\defcounter {refsection}{0}\relax
\addvspace {10\p@ }
\defcounter {refsection}{0}\relax
\contentsline {xchapter}{The funeral}{253}{chapter.58}
\defcounter {refsection}{0}\relax
\addvspace {10\p@ }
\defcounter {refsection}{0}\relax
\contentsline {xchapter}{Death certificate and Coroner's 
inquest}{273}{chapter.59}
\defcounter {refsection}{0}\relax
\addvspace {10\p@ }
\defcounter {refsection}{0}\relax
\contentsline {xchapter}{Registering a death and informing 
others}{285}{chapter.60}
\defcounter {refsection}{0}\relax
\addvspace {10\p@ }
\defcounter {refsection}{0}\relax
\contentsline {xchapter}{Probate and legal}{306}{chapter.61}
\defcounter {refsection}{0}\relax
\addvspace {10\p@ }
\defcounter {refsection}{0}\relax
\contentsline {xchapter}{Money and tax}{321}{chapter.62}
\defcounter {refsection}{0}\relax
\addvspace {10\p@ }
\defcounter {refsection}{0}\relax
\contentsline {xchapter}{Coping with grief, and bereavement 
advice}{325}{chapter.63}
\defcounter {refsection}{0}\relax
\addvspace {10\p@ }
\defcounter {refsection}{0}\relax
\contentsline {xchapter}{Getting bereavement support}{341}{chapter.64}
\defcounter {refsection}{0}\relax
\addvspace {10\p@ }
\defcounter {refsection}{0}\relax
\contentsline {xchapter}{Rigor mortis}{343}{chapter.65}
\defcounter {refsection}{0}\relax
\addvspace {10\p@ }
\defcounter {refsection}{0}\relax
\contentsline {xchapter}{Talking to children}{344}{chapter.66}
\defcounter {refsection}{0}\relax
\addvspace {10\p@ }
\defcounter {refsection}{0}\relax
\contentsline {xchapter}{Tackling loneliness}{345}{chapter.67}
\defcounter {refsection}{0}\relax
\addvspace {10\p@ }
\defcounter {refsection}{0}\relax
\contentsline {xchapter}{Scams and older people}{349}{chapter.68}
\defcounter {refsection}{0}\relax
\addvspace {10\p@ }
\defcounter {refsection}{0}\relax
\contentsline {xchapter}{How to deal with difficult 
conversations}{370}{chapter.69}
\defcounter {refsection}{0}\relax
\addvspace {10\p@ }
\defcounter {refsection}{0}\relax
\contentsline {xchapter}{Liverpool care pathway}{373}{chapter.70}
\defcounter {refsection}{0}\relax
\contentsline {xpart}{Nursing care}{377}{part.11}
\defcounter {refsection}{0}\relax
\contentsline {xpart}{Nursing care}{378}{part.12}
\defcounter {refsection}{0}\relax
\addvspace {10\p@ }
\defcounter {refsection}{0}\relax
\contentsline {xchapter}{Last offices}{378}{chapter.71}
\defcounter {refsection}{0}\relax
\addvspace {10\p@ }
\defcounter {refsection}{0}\relax
\contentsline {xchapter}{Caring with dignity}{384}{chapter.72}
\defcounter {refsection}{0}\relax
\contentsline {xpart}{Looking forward}{442}{part.13}
\defcounter {refsection}{0}\relax
\contentsline {xpart}{Possible new ideas}{443}{part.14}
\defcounter {refsection}{0}\relax
\addvspace {10\p@ }
\defcounter {refsection}{0}\relax
\contentsline {xchapter}{Dignity therapy}{444}{chapter.73}
\defcounter {refsection}{0}\relax
\contentsline {xpart}{end-piece}{446}{part.15}
--8<---------------cut here---------------end--------------->8---

Which is obviously useless for my needs.

Tomorrow I'm going to be working on what differences there are between
the '*.tex' file built using the report class and my working document in
'my-report' class, and try and build into my 'my-report' class the
differences and try and generate some useful 8.lof files.

Thanks
Sharon.
-- 
A taste of linux = http://www.sharons.org.uk
TGmeds = http://www.tgmeds.org.uk
Debian 8.4, fluxbox 1.3.7, emacs 25.1.1

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]