6

My simple document is divided into only two parts (it's only some math notes).

\starttext
% frontmatter
\startstandardmakeup
... % the cover
\stopstandardmakeup
\completecontent
\startbodymatter
... % main part
\stopbodymatter
\stoptext

I hope that the page number in frontmatter can be Roman numbers which start from the contents not the standardmakeup so I can achieve this by this:

\startfrontmatter
...
\stopstandardmakeup
\setupuserpagenumber[numberconversion=romannumerals]
\completecontent
\stopfrontmatter
\startbodymatter
% some settings?
...

and I also hope that the page numbers in bodypart can be from Arabic numeral 1, how can I achieve this?

more clearly: when ConTeXt enters the bodymatter, can I reset the page numbers so that it can start from 1?

1 Answer 1

7

To obtain roman page numbers for the front part you can either use

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

or

\startsectionblockenvironment [frontpart]
  \setupuserpagenumber [numberconversion=romannumerals]
\stopsectionblockenvironment

Commands that need to be invoked at the body part use the same mechanism, just replace frontpart with bodypart and use \setcounter to change the page number:

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

Here a full example:

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

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

\starttext
  \startstandardmakeup
    Cover page
  \stopstandardmakeup
  \startfrontmatter
    \completecontent
  \stopfrontmatter
  \startbodymatter
    Main part
  \stopbodymatter
\stoptext
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .