5

How can I put a list of tables and figures after each chapter, rather than just once at the end of the document?

\documentclass[a4paper,12pt,twoside]{book}
\usepackage{pdflscape}

\usepackage{endfloat}

\renewcommand{\theposttable}{\Roman{posttbl}}
\renewcommand{\thepostfigure}{\Roman{postfig}}
\renewcommand{\thefigure}{\Roman{figure}}
\renewcommand{\thetable}{\Roman{table}}

% new environment for landscape tables    
\newenvironment{ltable}
  {\begin{landscape}\begin{table}}
  {\end{table}\end{landscape}}

% make it known to endfloat
\DeclareDelayedFloatFlavor{ltable}{table}

\begin{document}

\chapter{This is Chapter 1}
Some text in chapter 1.  See my figure \ref{tab:table1}.

\begin{table}
\caption{First Table} \label{tab:table1}
\end{table}

\chapter{This is Chapter 2}
Some text in chapter 2.  See my figure \ref{tab:table2}.

\begin{ltable}
\caption{First Table} \label{tab:table2}
\end{ltable}

\end{document}
3
  • Does \processdelayedfloats at the end of each chapter work? See section 6 of endfloat's documentation Jan 30, 2014 at 14:34
  • @MikeRenfro that was my first guess also, but it doesn't handle the lists correctly.
    – StrongBad
    Jan 30, 2014 at 14:40
  • I just re-read. A list of figures at the end, not put all the figures at the end. Never mind. Jan 30, 2014 at 16:09

1 Answer 1

4

Use the titletoc package to generate the partial LoFs:

\documentclass[a4paper,12pt,twoside]{book}
\usepackage{pdflscape}
\usepackage[notablist]{endfloat}
\usepackage{titletoc}

\renewcommand{\theposttable}{\Roman{posttbl}}
\renewcommand{\thepostfigure}{\Roman{postfig}}
\renewcommand{\thefigure}{\Roman{figure}}
\renewcommand{\thetable}{\Roman{table}}

% new environment for landscape tables    
\newenvironment{ltable}
  {\begin{landscape}\begin{table}}
  {\end{table}\end{landscape}}

% make it known to endfloat
\DeclareDelayedFloatFlavor{ltable}{table}

\begin{document}

\chapter{This is Chapter 1}
\startlist{lot}
Some text in chapter 1.  See my figure \ref{tab:table1}.

\begin{table}
\caption{First Table} \label{tab:table1}
\end{table}

\begin{table}
\caption{Second Table} \label{tab:table2}
\end{table}

\printlist{lot}{}{\chapter*{List of tables in Chapter~\thechapter}}
\processdelayedfloats

\chapter{This is Chapter 2}
\startlist{lot}
Some text in chapter 2.  See my figure \ref{tab:table2}.

\begin{ltable}
\caption{Third Table} \label{tab:table3}
\end{ltable}

\begin{ltable}
\caption{Fourth Table} \label{tab:table4}
\end{ltable}

\begin{ltable}
\caption{Fifth Table} \label{tab:table5}
\end{ltable}

\printlist{lot}{}{\chapter*{List of tables in Chapter~\thechapter}}
\processdelayedfloats

\end{document}

Images of the partial lists:

enter image description here

and

enter image description here

After each chapter, use \startlist{lof} and at the end of a chapter, use

\printlist{lot}{}{\chapter*{List of tables in Chapter~\thechapter}}
\processdelayedfloats

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .