[Tugindia] Stuck with formatting of \tableofcontents heading

Ravindra Jore ravindra.jore at gmail.com
Sun Jan 25 12:53:30 CET 2009

Hello all,

       I am using pdflatex. It has table of contents, which by default shows
the heading 'Contents' in the default font and left aligned.

       Instead I want it to be right-aligned and draw a horizontal line
before it. Something like this:


I used \renewcommand{\contentsname} as below to add formatting along with
the text 'Contents'

   \hfill \bf\textit{\Huge Contents}}

But this shows errors. Is there any better way of formatting this?

Thank you in advance.
-Ravindra Jore

More information about the tugindia mailing list