How can I make figures be renumbered in a TeX document? I want the main figures to be 1, 2, 3, ...etc. But then I want a section to have supplementary figures, S1, S2, S3, S4. The "S" does not have to appear in the figure name, but I do want to reset the counter.
3
-
4This would be better asked on the TeX/LaTeX Stack Exchange site, now in public beta: tex.stackexchange.com/questions– David ZAug 2, 2010 at 20:39
-
have you looked at the caption package?– MicaAug 2, 2010 at 20:42
-
See tex.stackexchange.com/questions/41318/… and bytesizebio.net/2013/03/11/… for more information and tex.stackexchange.com/questions/39315/… and tex.stackexchange.com/questions/85776/… for more info– kdauriaMar 13, 2014 at 23:33
Add a comment
|
2 Answers
Next to reseting the counter for the figures:
\setcounter{figure}{0}
You can also add the "S" by using:
\makeatletter
\renewcommand{\thefigure}{S\@arabic\c@figure}
\makeatother
-
3You should always use
\makeatother
after this or it will mess up the use of @ in commands.– Quantum7Dec 14, 2010 at 12:42 -
-
For being able to restore the original behaviour:
\let\originalthefigure\thefigure
before this, and\let\thefigure\originalthefigure
when you want to restore it Nov 28, 2018 at 8:39