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 want to make my table of contents to have the words "Chapter", "Title" and "Page" written in uppercase, like "CHAPTER", "TITLE" and "PAGE". My document class is Book. How can I do it?

share|improve this question
5  
Please provide additional information (e.g. the document class). A minimal working example would be even better. –  lockstep May 14 '11 at 9:52
    
Solution found, I simply edited the style file of my document class! Not a very good idea, but it worked :D –  Sérgio May 16 '11 at 4:02
    
Rather than editing the question title as "[SOLVED]", you should write a separate (self-)answer. –  lockstep May 16 '11 at 5:21
    
A better option might be to use the titlesec package as described in this question about the table of contents –  Peter Grill Jul 18 '11 at 0:51

1 Answer 1

up vote 6 down vote accepted

For customizing the table of contents, you could use a dedicated package, such as

If you would like to change certain commonly used names, check if they are stored in a macro. There are common macros such as \chaptername, \partname, etc. You could redefine it, which would allow consistent use through the complete document, such as

\renewcommand*{\chaptername}{CHAPTER}

If you use the babel package, which is very recommendable, you should do it a bit differently, using the \addto command, otherwise babel would override your definition. Here's a complete example for you:

\documentclass{book}
\usepackage[english]{babel}
\addto{\captionsenglish}{%
  \renewcommand*{\chaptername}{CHAPTER}
  \renewcommand*{\pagename}{PAGE}}
\begin{document}
\tableofcontents
\chapter{Introduction}
See \pagename~1.
\end{document}

In your comment you said that you changed the style file. I would never do that since it would have effect on each other file which uses that class or style, respectively. Instead, I would use \renewcommand or \renewenvironment in the document preamble, copying the original definition there and making my changes - just in my own preamble, leaving the class/style untouched.

share|improve this answer

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.