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

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}
2
  • awesome, your solution worked perfectly! May 1 '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 9 '20 at 16:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.