Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I centre the title of the table of contents in LaTeX?

Tags:

latex

I'm trying to centre the title of the table of contents in LaTeX with the following command

\usepackage{tocloft}
\renewcommand{\contentsname}{\centering Table of Contents}

As I'm asking I'm sure you've all realised that this didn't work, any suggestions on what I can try?

Edit: I got it working with

\renewcommand{\cfttoctitlefont}{\hfill\Huge}
like image 262
Benjamin Confino Avatar asked Dec 02 '09 20:12

Benjamin Confino


1 Answers

This works (without the usepackage):

\renewcommand{\contentsname}{\centering Contents}

Make sure it's in the preamble, perhaps, and try killing the .aux file.

like image 50
Josh Lee Avatar answered Oct 24 '22 20:10

Josh Lee