[Tex/LaTex] How to switch page numbers to/from Roman numerals

contextpage-numbering

I am trying to have the page numbering of the front matter in lower case Roman and the rest in Arabic numbers. I also don't want the number on the title page (though it should be counted). According to the documentation I found (ConTeXt reference manual (2011); ConTeXt garden wiki), I should use something along the lines of

\setuppagenumbering[state=stop]
% title page
\setuppagenumbering[state=start,conversion=romannumerals]
% rest of front matter, e.g. TOC
\setuppagenumbering[conversion=numbers]
% body
% back matter

Well, the suppression of page numbers on the title page works, but I can't seem to switch to Roman numerals.

Best Answer

Page numbering of the front matter in lower case roman

Use the following setup

\definestructureconversionset [frontpart:pagenumber] [] [romannumerals]

If you want additional settings to be applied in the front or bodypart, you can use the command \startsectionblockenvironment. Just for demonstration, this is how you reset the page number to one in the bodymatter:

\startsectionblockenvironment [bodypart]
  \setcounter [userpage] [1]
\stopsectionblockenvironment

Don't forget to mark up you content, so ConTeXt knows where the front and bodymatter is:

\startfrontmatter
\stopfrontmatter

\startbodymatter
\stopbodymatter

The rest in Arabic numbers

That is already the default, there's no need to change that.

Title page

A title page is created as follows

\startstandardmakeup
  Content of the title page
\stopstandardmakeup

By default the page is not counted. To change this use the setting pagestart=start, here together with other settings to enlarge the font and to centre the content:

\setupmakeup
  [standard]
  [pagestate=start,
   style=bigbodyfont,
   align=middle]

Putting it all together leads to the following skeleton:

\definestructureconversionset [frontpart:pagenumber] [] [romannumerals]

\setupmakeup
  [standard]
  [pagestate=start,
   style=bigbodyfont,
   align=middle]

\starttext

\startstandardmakeup
  Title page
\stopstandardmakeup

\startfrontmatter
  \completecontent
\stopfrontmatter

\startbodymatter
  \startchapter [title=First chapter]
  \stopchapter
  \startchapter [title=Second chapter]
  \stopchapter
\stopbodymatter

\stoptext