7

I'm trying to get the word Appendix in front of my appendix chapter titles. I would like it to look like:

Appendix A My first appendix

I tried the appendix package, using \usepackage[title,titletoc]{appendix}. Somehow this works in the toc but not in the title on the page itself. How can add it for the title as well?

Here what I got:

\documentclass[pdftex,parskip=half,twoside, BCOR15mm]{scrreprt}%
\usepackage[title,titletoc]{appendix}
\usepackage{pdfpages}
\usepackage{amsmath, amssymb, fancyhdr}
\usepackage[english]{babel}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{here}


\begin{document}


\tableofcontents

\chapter{Chapter 1}
\chapter{Chapter 2}


\begin{appendices}


\chapter{Bli bla blubb}


asdasd
\end{appendices}

\end{document}
8

If you have nothing after the appendices, then this should do (I omitted the irrelevant packages and options). You don't need the appendix package.

\documentclass[
  appendixprefix=true, % the title will have Appendix A
]{scrreprt}

\makeatletter
%% change \numberline so that it will print "Appendix A"
\newcommand\appendix@numberline[1]{\appendixname\ #1\autodot\ }
\g@addto@macro\appendix{%
  \addtocontents{toc}{
    \let\protect\numberline\protect\appendix@numberline}%
}
\makeatother

\begin{document}

\tableofcontents

\chapter{Chapter 1}
\chapter{Chapter 2}

\appendix
\chapter{Bli bla blubb}

asdasd

\end{document}

Table of contents

enter image description here

Appendix

enter image description here


Notes.

  1. Don't add the pdftex option. It's not needed and may cause problems.

  2. Don't load the here package. It's obsolete and actually loads float. The [H] option to figure or table only makes typesetting worse.

  • Thanks a lot. Works perfectly well. Thanks for the hints too, I always thought I might have some unnecessary stuff included. – YumYum Oct 9 '13 at 20:59

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.