Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer

up vote 6 down vote accepted

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.

share|improve this answer
    
Thank you. That's exactly what I was looking for. –  Dominik Dec 7 '10 at 4:20
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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