[Tex/LaTex] Roman Page Numbering for TOC in Article

articledocument-classespage-numberingroman numerals

I'm writing something with the article class, and I'd like to have the table of contents pages numbered with roman numerals, and in addition and most importantly: to have the arabic numbers reset after the table of contents.

That's because I'm printing the document as I write, and the TOC will be ready only after the work is finish (and I don't want to change the page numbers). As it's a somewhat big article (~70 pages maybe) should I switch to a book class instead?

Best Answer

This would be automatic in book class

\frontmatter
\tableofcontents
\mainmatter
...

In other classes you could just borrow the definitions from book.cls

\makeatletter

\newif\if@mainmatter \@mainmattertrue

\newcommand\frontmatter{%
    \cleardoublepage
  \@mainmatterfalse
  \pagenumbering{roman}}
\newcommand\mainmatter{%
    \cleardoublepage
  \@mainmattertrue
  \pagenumbering{arabic}}
\makeatother

as may be seen from the above definitions, essentially all you need if you don't want to define commands is \pagenumbering{roman} at the start and \pagenumbering{arabic} at the point that you want to switch.