0

I tried to individualise the sectioning of my appendix. I would love to have it sectioned like this:

Appendix

A.1 First

A.2 Second

A.3 Third

B.1 Fourth

B.2 Fifth

B.3 ...

So far I tried to do this as following (complete MWE):

\documentclass[a4paper, numbers=noenddot]{scrbook}
\usepackage[utf8]{inputenc} 
\usepackage[english]{babel}
\usepackage{csquotes}
\usepackage{hyperref}

\begin{document}

\backmatter
\appendix
\chapter{Appendix}

\newcounter{subappendix}
\renewcommand{\thesection}{\Alph{section}.\arabic{subappendix}}

\stepcounter{subappendix}
\section{First}

\stepcounter{subappendix}
\setcounter{section}{0}
\section{Second}

\stepcounter{subappendix}
\setcounter{section}{0}
\section{Third}

\setcounter{subappendix}{1}
\setcounter{section}{1}
\section{Fourth)}

\stepcounter{subappendix}
\setcounter{section}{1}
\section{Fifth}

\stepcounter{subappendix}
\setcounter{section}{1}
\section{...}

\end{document}

This little hack does indeed work. However, it is ugly and produces the following warnings:

destination with the same identifier(name{section.A.1}) has been already used, duplicate ignored

destination with the same identifier(name{section.A.2}) has been already used, duplicate ignored

destination with the same identifier(name{section.A.2}) has been already used, duplicate ignored

This makes sense since the counter section is always set back. The warning is not the only problem. Because of the multiple use of some identifiers hyperref does not correctly link the to the appendix sections.

My question:

Is there a more elegant way to obtain the appendix structure I need?

  • Ever heard of \section? – Johannes_B Jul 16 '16 at 8:50
1

Use the dedault and don't confuse yourself with self made trouble.

phxKomaSectionAppendix

\documentclass[a4paper, numbers=noenddot]{scrbook}
\usepackage[utf8]{inputenc} 
\usepackage[english]{babel}
\usepackage{csquotes}
\usepackage{hyperref}

\begin{document}

\appendix
\chapter{Animals}

\section{Wombat}
\section{Capybara}
\section{Mara}

\chapter{People}
\section{Donald}
\section{Daisy}
\section{Goofy}

\end{document}

Alternative:

phxKomaSectionAppendixAlternative

\documentclass[a4paper, numbers=noenddot]{scrbook}
\usepackage[utf8]{inputenc} 
\usepackage[english]{babel}
\usepackage{csquotes}
\usepackage{hyperref}

\begin{document}

\appendix
\addchap*{Appendix}
\refstepcounter{chapter}

\section{Wombat}
\section{Capybara}
\section{Mara}

\refstepcounter{chapter}
\section{Donald}
\section{Daisy}
\section{Goofy}

\end{document}
  • Thanks. However, this does not produce the results I want to have. If you put \backmatter before \appendix you do not get the numbering in front of the chapters. Your example results in: "Animals - 1 Wombat - 2 Capybara - 3 Mara". – phx Jul 16 '16 at 8:57
  • Yes exactly, you are completely right. That is the purpose (and sole purpose) of \backmatter. You don't need it, you don't want it and it does harm. – Johannes_B Jul 16 '16 at 8:58
  • Well, don't get me wrong here but how do you know I don't need it? It's a larger thesis. There is a requirement that I do need the Appendix as a chapter and I do NOT need an A in front of Appendix. Your solution does meet this requirement. – phx Jul 16 '16 at 9:01
  • @phx Well then, your thesis office does not know basic rules of typography. I will delete my answer. – Johannes_B Jul 16 '16 at 9:03
  • Thanks anyway. Your effort is appreciated. And no, most people don't know anything about typography :( – phx Jul 16 '16 at 9:05

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.