23

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?

migrated from stackoverflow.com Jun 11 '13 at 7:19

This question came from our site for professional and enthusiast programmers.

  • 3
    What \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. – Werner Jun 11 '13 at 4:29
29

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. – TomM Dec 17 '13 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 – TomM Dec 17 '13 at 21:48
  • 2
    @TomM: In the KOMA-Script classes \tableformat can be redefined without \autodot: \renewcommand*{\tableformat}{\tablename~\thetable} – Heiko Oberdiek Dec 19 '13 at 17:38
11

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, you could just use the following, without a period:

\renewcommand{\thetable}{\Alph{chapter}\arabic{table}}
  • 3
    One still also needs to execute \setcounter{table}{0} at the start of each appendix if appendices are section-level rather than chapter-level dividers. – Mico May 28 '16 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. – Jonathan W. May 28 '16 at 22:03
  • 3
    For me this command only worked when I changed chapter to section: \setcounter{table}{0} & \renewcommand{\thetable}{\Alph{section}\arabic{table}} – NumesSanguis Jan 30 '17 at 6:31
  • 1
    That is because you used \section{} for the appendices and not \chapter{}... – Adam Erickson Oct 25 '18 at 23:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.