TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When using beamer with the subfigure package, the subfigure labels (a), (b) etc. are not reset at the beginning of a new figure.



            \subfigure[Text 1]{Testing subfigure}

            \subfigure[Text 2]{Testing subfiguare even more}      

            \subfigure[Text 1]{Testing subfigure}

            \subfigure[Text 2]{Testing subfiguare even more}      


How can I fix this?

share|improve this question
The subfigure package is obsolete. Use the subfig package package instead. – Werner Sep 8 '11 at 8:50
You should use subcaption instead of the deprecated subfigure. subfig is also deprecated. – Stefan Majewsky Sep 8 '11 at 11:52
subfig is not deprecated. – Gonzalo Medina Sep 8 '11 at 11:59
up vote 9 down vote accepted

With beamer's heavily redefined environments and macros to its custom overlay specification, the subfigure counter does not reset at the start of every figure environment. Easiest is to insert

\setcounter{subfigure}{0}% Reset subfigure counter

between the two frames (or before the next frame). If you're willing to have the frame be the designated "master" counter, you could add

\@addtoreset{subfigure}{framenumber}% subfigure counter resets every frame

at your document start. Alternatively, if you want to tie the subfigure counter to a figure (rather than a frame), you could use

\usepackage{etoolbox}% http://ctan.org/pkg/etoolbox
\AtBeginEnvironment{figure}{\setcounter{subfigure}{0}}% Resets subfigure counter at start of figure environment
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.