# Appendix not numbered - minimal document [duplicate]

I'm trying to put appendices in my PhD thesis, and I'd expected them to be labelled A,B, etc. However, instead it's not producing a title for the appendix at all, and it's giving me sections to my final chapter marked .1, .2 etc. I've looked around this site, and seen lots of problems about poorly placed \backmatter etc. but I'm getting this problem even with the following minimal code:

\documentclass[a4paper,10pt]{book}
\begin{document}
\chapter{Introduction}
This is my testbed.
\appendix
\section{What's this?}
This is an appendix.
\end{document}


This is everything- I've not omitted any packages or anything. This produces a single page:

Chapter 1

Introduction

This is my testbed.

.1 What's this?

This is an appendix.

• with the book class, the divisions after \appendix are expected to be \chapter, not \section. (by the way, welcome to tex.sx.) – barbara beeton Aug 29 '14 at 18:58
• In the book class the upper level of sectioning is chapter as you use it in your main body - use chapter in the appendix as well to get A, B etc - and you may add \part*{Appendix} after \appendix to get a separation – greyshade Aug 29 '14 at 18:58
• I think I require a higher rep to upvote your comments, but they've solved my problem- thank you! – rwold Aug 29 '14 at 19:09

The cause for this that the output for \section is coupled to the chapter number, i.e. 1.1 etc.

However, unless no \chapter is used, the result for \thesection should be 0.1 etc.

Now, \appendix redefines \thechapter to use uppercase letters instead of figures, so 1.1 would become A.1, but as the chapter number is 0, there is no corresponding letter for this, so the output of \Alph is empty, leaving .1 for the section number then.

There are some options:

• Use \chapter instead of \section in the Appendix level, as proposed by Barbara Beeton already.
• Or use \usepackage{chngcntr} in the preamble and \counterwithout{section}{chapter} after \appendix. This will change the section counter output too, decoupling it from \thechapter.

In the shown example I used the 2nd approach.

\documentclass[a4paper,10pt]{book}

\usepackage{chngcntr}

\begin{document}
\chapter{Introduction}
This is my testbed.
\appendix
\counterwithout{section}{chapter}
\section{What's this?}
This is an appendix.
\end{document}