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.
Asked
Active
Viewed 8.8k times
54
-
4This would be better asked on the TeX/LaTeX Stack Exchange site, now in public beta: http://tex.stackexchange.com/questions – David Z Aug 02 '10 at 20:39
-
have you looked at the caption package? – Mica Aug 02 '10 at 20:42
-
See http://tex.stackexchange.com/questions/41318/how-to-change-table-numbering-scheme-at-a-new-section and http://bytesizebio.net/2013/03/11/adding-supplementary-tables-and-figures-in-latex/ for more information and http://tex.stackexchange.com/questions/39315/how-to-change-the-numbering-for-different-figures and http://tex.stackexchange.com/questions/85776/change-figure-numbering-for-appendix?rq=1 for more info – kdauria Mar 13 '14 at 23:33
2 Answers
77
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. – Quantum7 Dec 14 '10 at 12:42
-
-
1For being able to restore the original behaviour: `\let\originalthefigure\thefigure` before this, and `\let\thefigure\originalthefigure` when you want to restore it – lucidbrot Nov 28 '18 at 08:39