9

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!

3
  • Shall all figure numbers (with or without chapter-leadin) be written as letters?
    – user31729
    Commented Mar 10, 2014 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
    Commented Mar 10, 2014 at 16:39
  • 1
    Then I got the clue correctly! I posted a (possible) solution
    – user31729
    Commented Mar 10, 2014 at 16:41

2 Answers 2

6

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}

introduction

chapter1

conclusion

0
5

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}
2
  • Thanks a lot. I tried this as well, and now it works properly, after you added the counters. =)
    – Eric
    Commented Mar 10, 2014 at 16:50
  • Yes, I posted the intermediate version accidently ;-)
    – user31729
    Commented Mar 10, 2014 at 16:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .