I have main tables and appendix tables in my paper. I would like to number the appendix tables "A1", "A2", "A3", etc OR, at the very least, re-start the table numbering at 1 in the appendix. Any suggestions on how to do that?
2 Answers
The documentclass might provide more elegant options. But the following should do the trick, inserted where the appendix starts:
\setcounter{table}{0}
\renewcommand{\thetable}{A\arabic{table}}
-
@HeikoOberdiek Do you know the best way how to get this done in
scrreprt
? Can you also recommend the hack for this class? Thanks.– TomMDec 17, 2013 at 20:55 -
Background: It produces a dot after each table which doesn't belong there. It even adds that dot to all my tables, also out of the appendix– TomMDec 17, 2013 at 21:48
-
3@TomM: In the KOMA-Script classes
\tableformat
can be redefined without\autodot
:\renewcommand*{\tableformat}{\tablename~\thetable}
Dec 19, 2013 at 17:38
A slightly more robust solution than that proposed by @HeikoOberdiek is to use \Alph
to format the name of the current appendix.
For example, I have multiple appendix chapters (A, B, etc.), and otherwise have my table names formatted with a period between chapter number and table number, so the following update of \thetable
continues this convention through the appendix:
\renewcommand{\thetable}{\Alph{chapter}.\arabic{table}}
In your case, assuming the appendix is a chapter (a MWE would help), you could just use the following, without a period:
\renewcommand{\thetable}{\Alph{chapter}\arabic{table}}
If your appendix is a section, you would want something like this:
\renewcommand{\thetable}{\Alph{section}\arabic{table}}
-
6One still also needs to execute
\setcounter{table}{0}
at the start of each appendix if appendices are section-level rather than chapter-level dividers.– MicoMay 28, 2016 at 21:41 -
In the documentclass I'm using, table numbering is chapter-specific, and since each appendix is delimited using a chapter, the counter is reset automatically. It seems this may not be the case for @user2472081, so yes, they would need to do that. As mentioned previously, a MWE would help clarify such things. May 28, 2016 at 22:03
-
5For me this command only worked when I changed
chapter
tosection
:\setcounter{table}{0}
&\renewcommand{\thetable}{\Alph{section}\arabic{table}}
Jan 30, 2017 at 6:31 -
2That is because you used
\section{}
for the appendices and not\chapter{}
... Oct 25, 2018 at 23:59
\documentclass
are you using? In fact, please create a minimal working example (MWE) of your current setup so it can be replicated. It will speed things up and get answers your way much quicker.