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 need to change default title of ToC. Is it possible with titlesec package? Here is my MWE:

\documentclass{book}

\usepackage{titlesec}
\titleformat{\chapter}{\normalfont\Large\scshape}{\thechapter}{1em}{} \vspace{6pt}]

\usepackage{lipsum}


%-------------------------------------------------------------------------

\begin{document}


\newpage
\thispagestyle{empty}
\tableofcontents
\thispagestyle{empty}
\newpage
\thispagestyle{empty}

\setcounter{footnote} {0}\chapter*{{\fontsize{11}{14}\selectfont\normalfont{Author1} \\
{\scshape\Large Title}}}
\addcontentsline{toc}{chapter}{\normalsize\normalfont{Author1} \\ \normalfont\scshape{Title}}
\thispagestyle{empty}
\Author{Author1}
\Title{Title}
\lipsum
\newpage
\thispagestyle{empty}



\end{document}
share|improve this question
1  
That is not a MWE because it's far from minimal. Also you don't have to sign with your name since it automatically appears in the lower right corner of your post. –  N.N. Sep 15 '11 at 8:57
    
@N.N. is it MWE now? I think I have to use {titlesec} in my preamble to show you. –  kotsport Sep 15 '11 at 9:11
    
I think it's can be more minimal. Please read the link I supplied carefully. –  N.N. Sep 15 '11 at 9:17

2 Answers 2

up vote 38 down vote accepted

How you change the title of the table of contents depends on if you're using the babel package or not.

Without babel

You can change the name of the table of contents by redefining \contentsname as the following illustrates:

\documentclass{article}

\renewcommand{\contentsname}{Whatever}

\begin{document}

\tableofcontents

\section{Section}

\subsection{Subsection}

\end{document}

With babel

If you use the babel package you'll have to change the name for the particular language you use with babel. Say that you load babel with english, then you do the following:

\documentclass{article}

\usepackage[english]{babel}

\addto\captionsenglish{% Replace "english" with the language you use
  \renewcommand{\contentsname}%
    {Whatever}%
}

\begin{document}

\tableofcontents

\section{Section}

\subsection{Subsection}

\end{document}

Either way you'll end up with the following result:

Title of table of contents changed to "Whatever"

share|improve this answer
    
@N.N. Now it works perfect! Thanks! –  kotsport Sep 15 '11 at 9:17
    
My babel language was USEnglish; I had to change the command to \captionsUSenglish. –  Jason Sep 26 '13 at 7:22

An alternative to N.N's solution that some might prefer if they're using the Memoir class is to redefine \printtoctitle instead of changing \contentsname directly. The reason for this is that often (and apparently by default) the ToC will list a reference to its own page within itself, and it will use \contentsname for both the ToC title and the reference, which can produce a jarring discontinuity of style with other chapter listings within the ToC.

With printtoctitle you can avoid this problem, since as described on page 147 of the Memoir manual, it's used to call \contentsname during ToC title creation, so you can shift all the formatting there instead.

Here's an example:

\documentclass[openany]{memoir}
\usepackage{memsty}

% This works well.
\renewcommand{\printtoctitle}[1]{\Huge\sffamily #1}

% This won't work well.
%\renewcommand{\contentsname}{\Huge\sffamily Contents}

\begin{document}
\tableofcontents

\chapter{Foo}

\end{document}
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.