Graphics, Figures & TablesFigure numbering

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
defreek
Posts: 2
Joined: Thu Mar 08, 2012 2:04 pm

Figure numbering

Post by defreek »

Hello,

Right now my figures are numbered per chapter, like Figure 1.1, Figure 2.3, etc..
But i want to have my figures numbered per section or subsection or even subsubsections like Figure 2.3.1.1

Any idea how i can achieve this?

Thanks!

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
Stefan Kottwitz
Site Admin
Posts: 10350
Joined: Mon Mar 10, 2008 9:44 pm

Figure numbering

Post by Stefan Kottwitz »

Hi,

welcome to the board!

You could use the chngcntr package for this, for example:

Code: Select all

\documentclass[12pt]{book}
\usepackage{chngcntr}
\counterwithin{figure}{subsection}
\begin{document}
\chapter{One}
\section{Section One}
\subsection{Subsection One}
\begin{figure}[ht]
  \centering
  \caption{Test figure}
\end{figure}
\end{document}
Have a look at the chngcntr documentation for details of usage.

Stefan
LaTeX.org admin
defreek
Posts: 2
Joined: Thu Mar 08, 2012 2:04 pm

Re: Figure numbering

Post by defreek »

Thank you very much for the reply :)
Post Reply