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.

My appendix style looks like this:

\newboolean{@@inappendix}
\newcommand{\@@appendixname}{Appendices}
\renewcommand{\appendix}{\par
  \setboolean{@@inappendix}{true}
  \setcounter{chapter}{0}%
  \setcounter{section}{0}%
%  \coversheet{\uppercase\expandafter{\@@appendixname}}  % REMOVE COVERSHEET
  \renewcommand{\@chapapp}{\appendixname}%
  \renewcommand{\thechapter}{\Alph{chapter}}%

Then in the main tex file I have:

\appendix
\include{appendix1}

In the appendix1 tex file I have:

\chapter{Flooding Test Graphs}

The actual appendix page title looks fine, but the TOC looks like this:

A FLOODING TEST GRAPHS

I would like it to say:

APPENDIX A FLOODING TEST GRAPHS

There are similar questions and answers posted, but I still can't seems to get it to work.

On the last line of the style file I tried:

\renewcommand{\thechapter}{APPENDIX\Alph{chapter}}

This just writes "APPENDIX" over "A FLOODING TEST GRAPHS"

share|improve this question

migrated from stackoverflow.com Feb 17 '12 at 12:00

This question came from our site for professional and enthusiast programmers.

    
the \renewcommand{\appendix}{\par ... \Alph{chapter}} seems to be missing a } in your example... is that in your code too? –  henrique Feb 17 '12 at 12:18
    
This response helped, but it's not quite what I need yet. I need the whole word Appendix to be capitalized in the Table of Contents. Right now, only the "A" is capitalized. Also, when I use the appendices environment, it puts the word APPENDIX followed by a number above the chapter heading for each chapter even if the chapter is not in the Appendix. Do you know how to solve this problem? –  user12216 Feb 29 '12 at 23:27

1 Answer 1

Use \usepackage[titletoc]{appendix} and then use the appendices environment:

enter image description here

\documentclass{book}
\usepackage[titletoc]{appendix}% http://ctan.org/pkg/appendices
\begin{document}
\tableofcontents
\chapter{A chapter} \chapter{A chapter} \chapter{A chapter}

\begin{appendices}
\chapter{An appendix} \chapter{An appendix}
\end{appendices}
\end{document}
share|improve this answer
    
Note that adding \usepackage{appendix} isn't sufficient. You need to use the titletoc option (or specify \appendixtocon). Merely using \appendix also does not suffice; use the appendices environment. –  Werner Feb 18 '12 at 16:32

Your Answer

 
discard

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