4

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.

3
  • \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
6

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

0
3

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.

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.