6

I'm writing a constitution-type document for a sports competition. I want each chapter heading to be preceded by the word "Article", viz: "Article 1 Rules of the competition", "Article 2 blah blah blah". So I added the following at the start of the document:

\renewcommand{\chapter}{\@startsection{chapter}{1}{0mm}{\baselineskip}{0.5\baselineskip}{\textsc{Article} \centering\sc\large}}

Unfortunately, this has also added the word "Article" to the title of the table of contents itself , so that it is now titled "Article Contents" instead of just "Contents".

How can I stop the word Article appearing in the title of the ToC? Or, is there a better way for me to add the word "article" to the header title for each chapter, but not the title of the ToC?

Mensch
  • 65,388
Gabriel
  • 63

1 Answers1

10

One way is to get \tableofcontents to add the word for you after it has used the original definition

\makeatletter
\let\oldtableofcontents\tableofcontents
\def\tableofcontents{\oldtableofcontents\gdef\addarticle{\textsc{Article} }}
\gdef\addarticle{}

\renewcommand{\chapter}{\@startsection{chapter}{1}{0mm}{\baselineskip}{0.5\baselineskip}{\addarticle\centering\sc\large}}

\makeatother
David Carlisle
  • 757,742
  • which works in the usual case when ToC is at the beginning ;) – yo' Oct 08 '12 at 12:16
  • @tohecz well yes, otherwise you just need to move the \gdef\addarticle{} into the start of the \tableofcontents definition so that it resets it and then sets it back, and initialise it to say Article rather than nothing. – David Carlisle Oct 08 '12 at 12:22