Hello,

I'm using the apa layout. It has no "part" environment, but only the
starred versions "part*", which means the parts are not numbered in
the text (same for sections/subsections). That's ok, it's a
requirement of the APA article style.

However, I would like to have a table of contents. I have tried to
redefine the "part*" command so that it includes an entry in the TOC.
I've put the following in the preamble:

%%%%
\let\oldpart\part*

\renewcommand{\part*}[1]{
 \oldpart{#1}
 \addcontentsline{toc}{part}{#1}
}
%%%%

This gives me errors, the first of which being:

%%%%
You can't use `macro parameter character #' in horizontal mode.
 \contentsline {part}{####1}{1}
%%%%

I have the impression this trick works fine if I try to redefine a
non-starred command, like  "part" or "section", but it fails for the
starred versions "part*" and "section*".

What am I doing wrong ? Is there a better way of doing this?

Thanks,
Sonja

Reply via email to