how can i make it so the figure in chapter 1 is 1.1 and the figure in chapter 2 is 2.1
thanks for anyhelp

Tim
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
Code: Select all
\documentclass{amsbook}
\numberwithin{figure}{chapter}%for figures
\numberwithin{table}{chapter}%for tables
\begin{document}
\chapter{Test chapter one}
\begin{figure}
\centering
\rule{5cm}{2cm}
\caption{test figure 1.}
\label{fig:testfig1}
\end{figure}
\chapter{Test chapter two}
\begin{figure}
\centering
\rule{5cm}{2cm}
\caption{test figure 2}
\label{fig:testfig2}
\end{figure}
\end{document}
Code: Select all
\usepackage[font=small,labelfont=bf]{caption}
\captionsetup{%
figurewithin=chapter
tablewithin=chapter
}
Two annotations because this is not (yet) mentioned in the caption-Package manual:localghost wrote:The current version of the caption package has a feature that allows to set up the counter according to your wishes.
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