Florent Michel schrieb am 25.09.2024 um 00:17:
Hi,

After looking at it a bit more, one solution can be found in the accepted answer to this question: https://tex.stackexchange.com/questions/108676/page-numbers-roman-number-and-arabic-numerals-in-context

The following example is slightly adapted from Marco's answer:

```
\usemodule[ipsum]

\definesectionblock[roman][romanpages]
\definestructureconversionset [roman:pagenumber] [] [romannumerals]

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

\starttext
   \startstandardmakeup
     \placecontent
   \stopstandardmakeup
   \startromanpages
     \section{Roman numeral pages}
     \dorecurse{6}{\ipsum\par}
   \stopromanpages
   \startbodymatter
     \section{Arabic numeral pages}
     \dorecurse{6}{\ipsum\par}
   \stopbodymatter
\stoptext
```

The page numbers look correct in Okular.

Is there a reason why you create a new sectionblock?

BTW: You can also reset userpagenumber instead of setting it back to 1 by hand.

%%%% begin example
\defineconversionset [frontpart:pagenumber] [] [romannumerals]

\startsectionblockenvironment [bodypart]
  \resetuserpagenumber
\stopsectionblockenvironment

\starttext

\startfrontmatter

\completecontent

\dorecurse{4}
  {\chapter{Chapter #1}
   \dorecurse{\numexpr#1*2\relax}{\samplefile{lorem}}}

\stopfrontmatter

\startbodymatter

\dorecurse{4}
  {\chapter{Chapter #1}
   \dorecurse{\numexpr#1*2\relax}{\samplefile{lorem}}}

\stopbodymatter

\stoptext
%%%% end example

Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

Reply via email to