You are most welcome! > It works really well, perhaps you should add it to wiki.
Good idea! I have added it here: https://wiki.contextgarden.net/Command/definesectionblock I have also tentatively added an alternate version which weems to work too as a second example for the \setupuserpagenumber command ( https://wiki.contextgarden.net/Command/setupuserpagenumber ). Best regards, Florent Le mer. 25 sept. 2024 à 13:06, Shiv Shankar Dayal < shivshankar.da...@gmail.com> a écrit : > Much thanks Florent. It works really well, perhaps you should add it to > wiki. > > On Wed, Sep 25, 2024 at 3:52 AM Florent Michel <florent....@gmail.com> > wrote: > > > > 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. > > > > Best regards, > > Florent > > > > Le mar. 24 sept. 2024 à 19:50, Florent Michel <florent....@gmail.com> a > écrit : > >> > >> Hi, > >> > >> I do not know how to do that properly (if someone has a solution, I'd > also be interested), but here is something which seems to give a partial > solution: > >> > >> ``` > >> \usemodule[ipsum] > >> > >> \starttext > >> > >> \placecontent > >> > >> \section{Section 1} > >> > >> \dorecurse {6} \ipsum > >> > >> \pagebreak > >> > >> \section{Section 2} > >> > >> \def\romanpage{\convertnumber{romannumerals}{\userpage}} > >> \setupuserpagenumber[ > >> numberconversion=romannumerals, > >> viewerprefix=\romanpage -, > >> ] > >> > >> \dorecurse {6} \ipsum > >> > >> \stoptext > >> ``` > >> > >> In section 2, pages are shown with roman numerals in the document and > as (roman numerals)-(arabic numerals) in the outline with Okular and > Evince. I don't know how to get only the first part, though. > >> > >> Best regards, > >> Florent > >> > >> Le mar. 24 sept. 2024 à 17:20, Shiv Shankar Dayal < > shivshankar.da...@gmail.com> a écrit : > >>> > >>> > Did you try a different PDF viewer? The display of the PDF outline > >>> > probably depends on the viewer. > >>> > >>> I used Evince and Okular(I am on Linux) and both work for LaTeX > >>> generated pdfs. > >>> > >>> > Maybe try > >>> > \enabledirectives[references.bookmarks.preroll] > >>> > or > >>> > \setupheads[expansion=yes] > >>> > >>> Tried both but they do not work. > >>> > >>> -- > >>> Respect, > >>> Shiv Shankar Dayal > >>> > ___________________________________________________________________________________ > >>> 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 > >>> > ___________________________________________________________________________________ > > > > > ___________________________________________________________________________________ > > 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 > > > ___________________________________________________________________________________ > > > > -- > Respect, > Shiv Shankar Dayal > > ___________________________________________________________________________________ > 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 > > ___________________________________________________________________________________ >
___________________________________________________________________________________ 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 ___________________________________________________________________________________