Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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}
share|improve this question

1 Answer 1

arsclassica uses \titleformat from the titlesec package to format sectional units; you can then redefine the section format inside the subappendices environment (making the change local) imitating the original definition, but including the appendix name:

\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[eulerchapternumbers,beramono,listings,%
                eulermath,pdfspacing]{classicthesis}

\usepackage{arsclassica}
\usepackage[title]{appendix}

\begin{document}

\tableofcontents

\chapter{Bla}

\begin{subappendices}
\titleformat{\section} 
  {\normalfont\Large\sffamily}{\spacedlowsmallcaps\appendixname\ %
  {\spacedlowsmallcaps\thesection}}%
  {1em}{\spacedlowsmallcaps}


\section{Foo}
\end{subappendices}

\end{document}

enter image description here

share|improve this answer
    
Thanks, it works! –  Leonardo May 2 '12 at 23:29
    
@Leonardo: you're welcome! Please consider accepting my answer (if you judge it solved your problem). –  Gonzalo Medina May 2 '12 at 23:30

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.