This is what I'm trying to do:
\renewcommand{\contentsname}{
\vspace{-8mm}
{\Huge Table of Contents}\vspace{-3mm}
\rule{\linewidth}{0.5mm} \\[-4mm]
}
Using babel, I can get this code to work:
\documentclass[12pt]{article}
\usepackage[english]{babel}
\addto\captionsenglish{
\renewcommand{\contentsname}
%\vspace{10mm}
{Table of Contents}
}
\begin{document}
\tableofcontents
\end{document}
but the second I try to add in that \vspace as a test, it fails. Any ideas how to fix this? Because I really want to add those options to the table of contents and I need the babel package as well.
\contentsnameshould contain only a string. Formatting changes to the table of contents should be made by modifying\tableofcontents. – egreg Nov 19 '12 at 17:24