I am using scrreprt from KOMA packages, the appendix
package, and the arsclassica
package.
I'd like to add "Appendix" before the number of an appendix to a chapter.
If I use scrreprt
and the appendix
package this can be done. Unfortunately, arsclassica
package redefines the \section
command in some way that the appendix
package cannot add "Appendix" to the title. This also cannot be changed with the appendixprefix
option of KOMA script.
I found something that almost works (full code at the end):
\begin{subappendices}
\begingroup
\def\thesection{Appendix \arabic{chapter}.\Alph{section}}
\section{Appendix one}
\section{Appendix two}
\endgroup
\end{subappendices}
The only problem is that this way an "Appendix" is added to the name at the ToC, which then is not properly aligned (it runs over the title of the appendix).
My question is then: is there a way to turn off the behavior only for the ToC, while keeping the extra "Appendix" display inside the subappendices
environment?
Here is the full code that has an issue of not displaying "Appendix" in the title of the section:
\documentclass[11pt,letterpaper,twoside=false,openright,titlepage,fleqn,%
headinclude=false,footinclude=false,BCOR=12.7mm,DIV=9,%
numbers=noenddot,cleardoublepage=empty,%
listof=totoc,%
captions=tableheading]{scrreprt}
\usepackage{makeidx}
\usepackage[title,titletoc]{appendix}
\usepackage[eulerchapternumbers,beramono,listings,%
eulermath,pdfspacing]{classicthesis}
\usepackage{arsclassica}
\begin{document}
\tableofcontents
\chapter{Bla}
\begin{subappendices}
\section{Foo}
\end{subappendices}
\end{document}
Best Answer
arsclassica
uses\titleformat
from thetitlesec
package to format sectional units; you can then redefine the section format inside thesubappendices
environment (making the change local) imitating the original definition, but including the appendix name: