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.

Simple question, but I can't put the answer together through googleing. I want to capitalize the table of contents TITLE in my LaTeX document. Nothing else. I'm using the tocloft package and various links I've read through suggest renewing the \cfttoctitlefont command, but I haven't had much luck.

share|improve this question
    
\renewcommand{\contentsname}{TABLE OF CONTENTS} –  egreg Apr 30 '12 at 11:05
    
I'm afraid that didn't work. I'm putting any sorts of gibberish instead of the "TABLE OF CONTENTS" and there appears to be no effect on the toc title. –  Jason Apr 30 '12 at 11:12
    
Please, show a minimal example; the code I gave should be in the preamble of the document (that is, before \begin{document}. Are you using babel? –  egreg Apr 30 '12 at 11:18
add comment

2 Answers 2

up vote 2 down vote accepted

If you only want to capitalize the ToC title and not to use a different name, the following works:

\documentclass{article}

\usepackage{tocloft}

\renewcommand{\cfttoctitlefont}{\normalfont\Large\bfseries\MakeUppercase}

\begin{document}

\tableofcontents

\section{foo}

\end{document}

enter image description here

share|improve this answer
    
That did the trick, thanks. –  Jason Apr 30 '12 at 11:34
add comment

The following example works:

\documentclass{book}
\usepackage[titles]{tocloft}
\renewcommand{\contentsname}{TABLE OF CONTENTS}
\begin{document}
\frontmatter
\tableofcontents
\mainmatter
\chapter{A}
\end{document}

Replace TABLE OF CONTENTS with what you want. If you're using babel, then a different way must be used:

\documentclass{book}
\usepackage[english]{babel}
\usepackage[titles]{tocloft}
\addto\captionsenglish{%
  \renewcommand{\contentsname}{TABLE OF CONTENTS}%
}
\begin{document}
\frontmatter
\tableofcontents
\mainmatter
\chapter{A}
\end{document}

Use \captions<language> for the language you're actually having as the main one.

The titles option to tocloft avoids that the package acts on the way titles for table of contents and "lists of" are managed.

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.