Graphics, Figures & Tables ⇒ Table numbering in Appendices
Table numbering in Appendices
I've just converted some articles to the new Elsevier class and suddenly the appendices are all weird. I want to have appendices numbered A, B and so on, with tables numbered A.1, A.2, B.1.... which worked very well before. Now it continues table numbering from main document.
I managed to get it to have A, B etc in front of the table numbers by using the appendix-package, but it still continues on the main table numbering (A.7, A.8, B.9) instead of restarting.
Does anyone have an idea of how to get around this?
//Elisabeth
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- Stefan Kottwitz
- Site Admin
- Posts: 10358
- Joined: Mon Mar 10, 2008 9:44 pm
Table numbering in Appendices
you could use \numberwithin of the amsmath package (especially if you're already using amsmath) or \counterwithin of the chngcntr package to number tables per section or chapter, like
Code: Select all
\numberwithin{table}{section}
Stefan
Re: Table numbering in Appendices
//Elisabeth
- Stefan Kottwitz
- Site Admin
- Posts: 10358
- Joined: Mon Mar 10, 2008 9:44 pm
Table numbering in Appendices
Code: Select all
\renewcommand*\thetable{\Alph{section}.\arabic{table}}
Re: Table numbering in Appendices

Thanks a lot for the help!
//Elisabeth
Table numbering in Appendices
Code: Select all
\setcounter{table}{0}
\renewcommand\thetable{\Alph{section}.\arabic{table}}
- Stefan Kottwitz
- Site Admin
- Posts: 10358
- Joined: Mon Mar 10, 2008 9:44 pm
Re: Table numbering in Appendices
welcome to the board!
If \numberwithin or \counterwithin like suggested above is used resetting the counter to 0 won't be necessary, it would be reset already at the beginning of every section.
Otherwise one would have to repeat this reset command at the beginning of appendix section B etc.
Stefan
Table numbering in Appendices
I agree. On the other hand, one may want the tables to be numbered throughout in the main body of the article, independently of the section (and not Table 1.1, 2.1, and so on), while numbered differently when it comes to the appendix. That's what I was trying to achieve with the counter reset.If \numberwithin or \counterwithin like suggested above is used resetting the counter to 0 won't be necessary, it would be reset already at the beginning of every section.
In fact, that's the most common situation I can think of: say, a 20-page paper with 5 sections, where numbering the tables by section would be kind of an overkill. But in such a case, you may still want the tables in the appendix to be numbered distinctly.