# Show Chapter and Page Number in List Of Figures

I am creating a document framework for my mini-dissertation.

The document will consist of multiple chapters. In each chapter the page numbering will start at 1. This is achieved by using setcounter{page}{1} after every new \chapter{}.

In the footer I display the current chapter and page by using \fancyfoot[RO,RE]{\thechapter.\thepage}. Displaying 1.2 for chapter 1, page 2 for example.

How can I achieve the same numbering format in my table of content, list of figures and list of tables?

• Welcome to TeX.SX! Are you saying that you want the table of contents, list of figures and list of tables to be numbered chapters? – karlkoeller Feb 7 '14 at 19:20
• I want every item in the list of figures to be specified by its chapter and page number. – blaffie Feb 7 '14 at 19:24
• Sorry, I don't understand. If you have Figure 2.1 and Figure 2.2 (where the first number is the chapter and the second the progressive one) at page 15, you would have both this items in the LoF as 2.15 Figure Caption? – karlkoeller Feb 7 '14 at 19:31
• The figure caption is fine in the LoF. Both figures should then be specified as being on page 2.15. i.e: Figure 2.1: Caption ........ 2.15 \\ Figure 2.2: Caption ........ 2.15 – blaffie Feb 7 '14 at 19:41
• Now I understand... – karlkoeller Feb 7 '14 at 19:49

To achieve what you want you can simply patch the command \addcontentsline to print \thechapter.\thepage instead of \thepage. That is, add the following code in your preamble:

\usepackage{etoolbox}
{\thepage}
{\thechapter.\thepage}
{}
{}


MWE

\documentclass{book}

\usepackage{etoolbox}
{\thepage}
{\thechapter.\thepage}
{}
{}

\begin{document}

\tableofcontents

\chapter{1st}
\begin{figure}[h]
\caption{foo figure}
\end{figure}
\begin{table}[h]
\caption{foo table}
\end{table}

\chapter{2nd}
\begin{figure}[h]
\caption{another foo figure}
\end{figure}
\begin{table}[h]
\caption{another foo table}
\end{table}

\listoffigures
\listoftables

\end{document}


Output (ToC)

Output (LoF)

• @cmhughes Remember to do it! :-) – karlkoeller Feb 7 '14 at 19:58

All references to pages use \thepage (including those used in the ToC/LoF/LoT), so you need only update that in order to achieve the appropriate page labelling:

\renewcommand{\thepage}{\thechapter.\arabic{page}}


Here is a minimal example that incorporates the above as part of \mainmatter (allowing you to set a different page numbering scheme for \frontmatter and perhaps \backmatter), as well as automatically setting the page counter to 1 at the start of every \chapter:

\documentclass{book}

\usepackage{etoolbox,lipsum}% http://ctan.org/pkg/{etoolbox,lipsum}

\makeatletter
% Adjust the way the page numbers are displayed
\renewcommand{\thepage}{\thechapter.\arabic{page}}%
% Reset the page counter to 1 at the start of \chapter
% \patchcmd{<cmd>}{<search>}{<replace>}{<success>}{<failure>}
\patchcmd{\chapter}{\fi}{\fi\setcounter{page}{1}}{}{}%
}
\makeatother

\begin{document}

\frontmatter
\tableofcontents
\listoffigures
\listoftables

\mainmatter
\chapter{1st}
\lipsum% Some text.
\begin{figure}[ht] \caption{foo figure} \end{figure}
\lipsum[1-50]% Some text.
\begin{table}[ht] \caption{foo table} \end{table}
\lipsum[1-50]% Some text.

\chapter{2nd}
\lipsum% Some text.
\begin{figure}[ht] \caption{another foo figure} \end{figure}
\lipsum[1-50]% Some text.
\begin{table}[ht] \caption{another foo table} \end{table}
\lipsum[1-50]% Some text.

\end{document}