在LaTeX中如何给图表标题添加前缀?

25

如何在LaTeX中更改所有图表的标题以包含前缀?例如,使所有图表显示为“补充图1”,“补充图2”,...而不是“图1”,“图2”?

谢谢。

3个回答

29

答案是使用以下命令:

\renewcommand{\figurename}{Supplementary Figure}

23
要给编号添加前缀“S”,请使用以下命令:
\renewcommand{\thepage}{S\arabic{page}}
\renewcommand{\thesection}{S\arabic{section}}
\renewcommand{\thetable}{S\arabic{table}}
\renewcommand{\thefigure}{S\arabic{figure}} 要修改标题开头的文本,请使用以下命令:
\renewcommand{\figurename}{Supplemental Material, Figure} 来源:https://www.stat.berkeley.edu/~paciorek/computingTips/Customizing_numbering_pages.html

1
有没有一种方法只针对补充部分进行操作,而不是其他主要部分? - ajl123
@ajl123 将这些命令放在主要部分之后,但在补充部分之前。 - hasManyStupidQuestions

4
如果你希望重新开始编号图表从1开始,那么也请添加第二行。
\renewcommand{\figurename}{Supplementary Figure}
\setcounter{figure}{0}

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接