5

I need to give a Roman number to the ToC. So basically, I want the ToC to internally use \chapter instead of \chapter*. Is there any way to do that?

1 Answer 1

6

You could temporarily change the meaning of \chapter*:

\let\stdchapter\chapter
\def\chapter*#1{\stdchapter[\contentsname]{#1}}
\renewcommand{\thechapter}{\Roman{chapter}}
\tableofcontents
\let\chapter\stdchapter

I used \contentsname for the optional argument to \stdchapter because the argument #1 might contain mark commands for the headings, for example \@mkboth. That's no problem for the starred command, but if you would use an unstarred command without the optional argument, the mark command would be put into the TOC line as well.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.