[OS X TeX] Controlling Fig and Table labels
Bruno Voisin
bvoisin at mac.com
Mon May 21 21:22:02 CEST 2007
Le 21 mai 07 à 18:41, tom keyes a écrit :
> many journals now request a separate section of 'supplementary
> information'. i would like the Figs and Tables in this section to
> be labeled S1, S2 etc instead of the usual 1, 2, etc. Can i do that?
\renewcommand{\thefigure}{S\arabic{figure}}
\renewcommand{\thetable} {S\arabic{table}}
Depending on the class you're using, you may have to make sure that
the figure and table counters are reset to 0 at the beginning of
these supplementary sections:
\setcounter{figure}{0}
\setcounter{table} {0}
For example, figures and tables are numbered continuously through all
sections with the article class, as follows from the definition of
the associated counters in article.cls, equivalent to:
\newcounter{figure}
\newcounter{table}
\renewcommand{\thefigure}{\arabic{figure}}
\renewcommand{\thetable} {\arabic{table}}
By contrast, the figure and chapter counters are reset to 0 at the
beginning of every chapter with the report class, as follows from the
definitions in report.cls, equivalent to:
\newcounter{figure}[chapter]
\newcounter{table} [chapter]
\renewcommand{\thefigure}{\ifthenelse{\value{chapter}>0}{\thechapter.}
{}\arabic{figure}}
\renewcommand{\thetable} {\ifthenelse{\value{chapter}>0}{\thechapter.}
{}\arabic{table}}
There, the [chapter] optional argument to \newcounter tells the newly
defined counters are reset to 0 at every new \chapter, and the
definitions of \thefigure and \thetable (defining the figure and
table numbers as they appear in the captions, in figure and table
cross-references and in the lists of figures and tables) should be
straightforward enough to decipher.
Bruno Voisin
------------------------- Helpful Info -------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/
List Reminders & Etiquette: http://www.esm.psu.edu/mac-tex/list/
More information about the macostex-archives
mailing list