5

I am having trouble formatting my list of figures and list of tables.

Currently, my tex document is printing the list in the following manner:

1 Foreign Key Constraint Problem Due to Improper Table Design. . . . 3

2 Application Flow of Territory Maintenance Tool. . . . . . . . . . . . . 4

But I want to number figures by their sections:

3.1.2 Foreign Key Constraint Problem Due to Improper Table Design

lockstep
  • 250,273

1 Answers1

6

Your question is the counterpart of this one. So: use the chngcntr package.

\documentclass{report}

\usepackage{chngcntr}
\counterwithin{figure}{section}

\begin{document}

\listoffigures

\chapter{foo}

\section{bar}

\begin{figure}
\centering
\rule{1cm}{1cm}
\caption{A figure}
\end{figure}

\end{document}
lockstep
  • 250,273
  • awesome, your solution worked perfectly! – Midnight Blue May 01 '11 at 22:47
  • If you use \counterwithout with current LaTeX you don't need chngcntr package anymore, moreover you should avoid loading it because it messes up numbers of references to figures. – mmj Mar 09 '20 at 16:40