adding prefix to figure caption in LaTeX?
How can I change the caption of all figures in LaTeX to include a prefix? For example, make all figures appear as "Supplementary Figure 1", "Supplementary Figure 2", ... rather than "Figure 1", "开发者_JS百科Figure 2"?
thanks.
The answer is to use the following command:
\renewcommand{\figurename}{Supplementary Figure}
To number labels with prefix 'S', use:
\renewcommand{\thepage}{S\arabic{page}}
\renewcommand{\thesection}{S\arabic{section}}
\renewcommand{\thetable}{S\arabic{table}}
\renewcommand{\thefigure}{S\arabic{figure}}
To modify the text used at the start of a caption:
\renewcommand{\figurename}{Supplemental Material, Figure}
Source: https://www.stat.berkeley.edu/~paciorek/computingTips/Customizing_numbering_pages.html
Add the second line as well if you would like restart numbering of figures to start at 1.
\renewcommand{\figurename}{Supplementary Figure}
\setcounter{figure}{0}
精彩评论