I need number of figure by chapter:
I'm using this but sometimes it repeats the numeration
\usepackage{chngcntr}
\counterwithin{figure}{chapter}
\counterwithin{table}{chapter}
example:
chapter1
figure 1.1
figure 1.2
figure 1.3
chapter2
figure 2.1
section 2.1
figure 2.2
figure 2.3
chapter3
figure 3.1
figure 3.2
section 3.1
figure 3.3
example:
\documentclass{report}
\usepackage{float}
\usepackage{chngcntr}
\counterwithin{figure}{section}
\begin{document}
\chapter{}
\section{section 1.1}
\begin{figure}[H]
\centering
\rule{1cm}{1cm}% placeholder for graphic
\caption{A figure}
\end{figure}
\begin{figure}[H]
\centering
\rule{1cm}{1cm}% placeholder for graphic
\caption{A figure}
\end{figure}
\section{section 1.2}
\begin{figure}[H]
\centering
\rule{1cm}{1cm}% placeholder for graphic
\caption{A figure}
\end{figure}
\chapter{}
\section{section 2.1}
\begin{figure}[H]
\centering
\rule{1cm}{1cm}% placeholder for graphic
\caption{A figure}
\end{figure}
\end{document}
Best Answer
report
class when chapters are needed.Do not include numbers in section and chapters (those are created automatically by latex)