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.
Renumbering figure in LaTeX?
Asked Answered
This would be better asked on the TeX/LaTeX Stack Exchange site, now in public beta: tex.stackexchange.com/questions –
Gavin
have you looked at the caption package? –
Refractive
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 –
Earthward
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
You should always use
\makeatother
after this or it will mess up the use of @ in commands. –
Coussoule Works for subfigures too:
\setcounter{subfigure}{0}
. –
Guardant For being able to restore the original behaviour:
\let\originalthefigure\thefigure
before this, and \let\thefigure\originalthefigure
when you want to restore it –
Ill you can reset the figure counter with
\setcounter{figure}{0}
© 2022 - 2024 — McMap. All rights reserved.