# Changing the appendix section numbering back to A.1 when using scrbook with the appendix package

I have to submit my thesis next week and my professor just asked me to adapt to appendix numbering to "standard", i. e., A.1, A.2 etc.

I'm writing my thesis as a KOMA-Script scrbook. I'm using the appendix package, as that seemed to be the easiest way to make the appendix appear as a chapter in my thesis.

Currently, my ToC looks like this:

1 Chapter
1.1 Section

Appendices
1 Appendix section
List of Tables


But it has to look like this:

1 Chapter
1.1 Section

Appendices
A.1 Appendix section
A.2 List of Tables


The only clue I found in the appendix package documentation is the following quote:

By default, the subappendices are numbered like normal (sub)sections, except that the (sub)section number itself is typeset as an uppercase letter. This behaviour can be changed by redefining these \setthe... commands. For example, to just have a letter not prepended by the main division number, do: \renewcommand{\setthesection}{\Alph{section}}

This sounds as if the appendices should already be numbered the way I need them to be. But they are not. The \renewcommand... does not affect the numbering at all.

How to force the List of Tables to be numbered accordingly is probably a second issue - I have no idea how to get it numbered at all :(

Here is my minimal working example:

\documentclass[listof=totoc, listof=leveldown]{scrbook}
\newcommand{\mycap}[2]{\caption[#1]{\textbf{#1} #2}}
\begin{document}
\frontmatter
\tableofcontents
\mainmatter
\chapter{Standard Chapter}
\section{Standard Section}

\begin{table}
\mycap{Caption1.}{Rest of caption.}
\begin{tabular}{r r r}
Col1&Col2&Col3\\
Col1&Col2&Col3
\end{tabular}
\end{table}

\backmatter
\begin{appendices}
\renewcommand{\thetable}{A.\arabic{table}}
\setcounter{table}{0}

\section{Appendix Section}
This is my appendix section.
\begin{table}
\mycap{Caption2.}{Rest of caption.}
\begin{tabular}{r r r}
Col1&Col2&Col3\\
Col1&Col2&Col3
\end{tabular}
\end{table}

\listoftables
\end{appendices}
\end{document}


How do I fix the numbering?

• I found part of the answer here: tex.stackexchange.com/questions/82307/… By using the option listof=totocnumbered instead of listof=totoc, the List of Tables is treated as a section rather than a section*. But I still don't know how to change the section numbers to A.1, A.2 and so on.
– Anna
Sep 23 '16 at 14:57

You already found out that the list of tables gets numbered when choosing the documentclass option listof=totocnumbered. There are two more things that have to be done.

1. Remove \backmatter or add the line

\makeatletter\@mainmattertrue\makeatother

below \backmatter. The main task of \backmatter is to switch @mainmatter to false; as main consequence of this, section and subsection numbers will no longer be prefixed by chapter numbers. Keep \backmatter if you want it still to take care that the appendices open on a right-hand page if a certain option is set. Since you use \begin{appendices} from the appendix package, which takes care of this itself, \backmatter is redundant in your case.

1. After \begin{appendices}, add the line

\refstepcounter{chapter}

This is necessary since you have no \chapter command, hence the chapter counter remains set to 0, which cannot be displayed as letter. \refstepcounter not only sets the chapter number to 1 (displayed as A), but also resets all subordinate counters, so that sections, subsections, tables, figures etc are numbered within the appendix, starting from 1.

Regarding your sample code, you just have to replace the lines

\backmatter
\begin{appendices}
\renewcommand{\thetable}{A.\arabic{table}}
\setcounter{table}{0}


by

\begin{appendices}
\refstepcounter{chapter}

• So it's important to leave out \backmatter? That will change the page numbering in the \backmatter part of the document, won't it? I'm trying it on my actual thesis and will be back with feedback in a few minutes. Thanks!
– Anna
Sep 23 '16 at 15:32
• @Anna It's not \backmatter as a whole, but it sets @mainmatter to false. I modified my suggestion to leave \backmatter in (it also takes care of opening on the right side if some option is set) and to set @mainmatter to true again. A bit less drastical, but it might still have side effects. I will check. Sep 23 '16 at 15:37
• So far the first solution (without \backmatter) looks perfect :) I'll report if I come across any issues, but it looks like this is a perfectly simple solution :) Thanks a lot! But I don't really get why it works. It would we great if you could explain that.
– Anna
Sep 23 '16 at 15:40
• @Anna Otherwise it is better to use \refstepcounter{chapter} (even if there is no chapter B), since it will reset all counters depending on it, including table. Sep 23 '16 at 15:40
• Otherwise, like when? By the way, I never really thought about why I should use \backmatter in the first place -- I just thought, that was how one is supposed to structure an scrbook. But apparently, the main function of \backmatteris to turn off chapter numbering -- which really doesn't make any sense for me, as there are no chapters after my \backmatter, except for the appendix. So, I decided to use your first suggestion :) Maybe you should put it back into your answer, for future reference?
– Anna
Sep 23 '16 at 15:50