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 have a long appendix which includes a lot of equations and figures. My document class is report. In order to have a separate appendix section, I used:

\appendix
\chapter{The first appendix} 

The outcome shows like this

Chapter A

The first appendix

How can I change it to:

Appendix A

The first appendix

I also tried

\chapter*{Appendix: The First Appendix}
\addcontentsline{toc}{chapter}{Appendix: The First Appendix}

But in this way, my equation number does not start with A.1. This will not work for me.

share|improve this question
3  
Can you construct a minimal example of what you are doing. If you create a document with \documentclass{report}, one chapter, the \appendix command and another chapter, the appendix name shows up as you want it, so you must be doing something else. (I also formatted your code. You can format code by indenting it by 4 spaces, or selecting it and clicking the {} icon.) –  Alan Munn Jun 17 '11 at 23:47
    
Is this problem with the chapter name appearing in the chapter heading or only in the table of contents? As I couldn't reproduce the issue here, besides the minimal working example you should post your preamble, too. –  henrique Jun 18 '11 at 0:19
    
I think this issue only occurs on old packages. I had the same experience in the past, so update your packages first and let me know. –  xport Jun 18 '11 at 19:12
add comment

3 Answers

I do not really understand your problem. However, maybe that you are looking fro something like this:

\documentclass{report}
\usepackage[english]{babel}
\usepackage{blindtext}

\makeatletter
\def\setChapterprefix#1{\gdef\@Prefix{#1}}
\setChapterprefix{}
\renewcommand*\l@chapter[2]{%
  \ifnum \c@tocdepth >\m@ne
    \addpenalty{-\@highpenalty}%
    \vskip 1.0em \@plus\p@
    \setlength\@tempdima{1.5em}%
    \begingroup
      \parindent \z@ \rightskip \@pnumwidth
      \parfillskip -\@pnumwidth
      \leavevmode \bfseries
      \advance\leftskip\@tempdima
      \hskip -\leftskip
      \@Prefix 
      #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par
      \penalty\@highpenalty
    \endgroup
  \fi}
    \makeatother
\begin{document}
    \tableofcontents
    \chapter{Introduction to Quantum Electrodynamics}
        \blindtext
    \appendix
    \addtocontents{toc}{\protect\setChapterprefix{Appendix }}
    \chapter{Calculus of Variations}
        \blindtext
    \chapter{Digital Signal Processing}
        \blindtext
\end{document}

enter image description here

share|improve this answer
1  
Great solution! if needed, the chapter name can also be shown, with an \addtocontents{toc}{\protect\setChapterprefix{Chapter }} before the chapters –  henrique Jun 18 '11 at 15:57
add comment

As xport noted, you probably have an old (very old) version of TeX. Newer version don't have this problem. The best solution is to update; you probably have a lot of other since-corrected misfeatures in addition to this one. If you can't update, try the following:

\appendix
\renewcommand\chaptername{Appendix}
\chapter{The first appendix} 
share|improve this answer
add comment

Use the following code within the chapter not the preamble:

\setcounter{chapter}{0}
\appendix
\makeatletter
\renewcommand{\@chapapp}{Appendix}
\makeatother
share|improve this answer
add comment

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.