# Figure numbering in \chapter*

I am writing my thesis using the amsbook class, when I just discovered that the Figure numbering does not reset after introducing \chapter*. In particular, I have the following skeleton:

\documentclass{amsbook}

\begin{document}

\chapter*{Introduction}
\chapter{1}
\chapter{2}
\chapter{3}
\chapter*{Conclusion}

\end{document}


I have a figure environment in my Introduction, which currently is labelled Figure 0.1.

I didn't mind this, but when I included a figure in the conclusion, it was labelled Figure 3.7, a continuation of the figure numbering from the previous chapter, which stopped at Figure 3.6.

I saw some ways to redefine the numbering or to rename the figure name, e.g., using Fig instead of Figure. However, I cannot seem to find a way to relabel the figure count to using letters instead.

I figured (no pun intended), that since I am using only one Figure in my introduction and another one in my conclusion, then just set (even manually) the figure label in my introduction as 'Figure A' and the figure in my conclusion as 'Figure B', and the rest of the figures in the main chapters as they are, i.e. Figure X.Y (X is the chapter and Y is the chronological count of the figure).

Is there a way to do this? Thanks a lot!

-
Shall all figure numbers (with or without chapter-leadin) be written as letters? –  Christian Hupfer Mar 10 at 16:38
Hi @ChristianH., No. Only the figures in the introduction and conclusion. The rest remains as they are. For instance, the first figure in Chapter 1 reads "Figure 1.1". =) –  Eric Mar 10 at 16:39
Then I got the clue correctly! I posted a (possible) solution –  Christian Hupfer Mar 10 at 16:41

## 2 Answers

A simple way (for the \chapter* figures) is to just redefine \thefigure within the figure environments that need to be changed.

\begin{figure}
\renewcommand\thefigure{A} % Make this Figure A
...


A working example:

\documentclass[]{amsbook}

\usepackage[demo]{graphicx}

% Set counter to include Chapter
\usepackage{chngcntr}
\counterwithin{figure}{chapter}

\begin{document}

\chapter*{Introduction}
Content references Fig.~\ref{fig:a}
\begin{figure}[h]
\renewcommand\thefigure{A} % Make this Figure A
\centering
\includegraphics[width=3in]{test.pdf}
\caption{Caption}\label{fig:a}
\end{figure}

\chapter{One}
Content references Fig.~\ref{fig:one}
\begin{figure}[h]
\centering
\includegraphics[width=3in]{test.pdf}
\caption{Caption}\label{fig:one}
\end{figure}

\chapter*{Conclusion}
Content references Fig.~\ref{fig:b}
\begin{figure}[h]
\renewcommand\thefigure{B}
\centering
\includegraphics[width=3in]{test.pdf}
\caption{Caption}\label{fig:b}
\end{figure}

\end{document}


-
Thank you. Works like magic! =) –  Eric Mar 10 at 16:46

An automatic way would (probably) mean to redefine the \chapter* command. Perhaps, this will work also for you.

\documentclass{amsbook}

\begin{document}

\newcounter{otherfigure}
\setcounter{otherfigure}{0}

\let\originalthefigure\thefigure
\renewcommand{\thefigure}{\Alph{figure}}

\chapter*{Introduction}
\begin{figure}

\caption{There should be a figure in here}
\setcounter{otherfigure}{\number\value{figure}}
\end{figure}
\let\thefigure\originalthefigure
\renewcommand{\thefigure}{\thechapter.\arabic{figure}}

\chapter{1}
\chapter{2}
\begin{figure}

\caption{There should be a figure in here}
\end{figure}

\chapter{3}

\let\originalthefigure\thefigure
\renewcommand{\thefigure}{\Alph{figure}}

\setcounter{figure}{\number\value{otherfigure}}
\chapter*{Conclusion}

\begin{figure}

\caption{There should be another figure in here}
\end{figure}

\end{document}

-
Thanks a lot. I tried this as well, and now it works properly, after you added the counters. =) –  Eric Mar 10 at 16:50
Yes, I posted the intermediate version accidently ;-) –  Christian Hupfer Mar 10 at 16:50