![](https://secure.gravatar.com/avatar/93131e1e6e2204bd13501390d768dbdc.jpg?s=120&d=mm&r=g)
On Fri, 7 Dec 2007 17:29:36 +0100
"Mojca Miklavec"
On 11/29/07, Wolfgang Schuster
wrote: On Wed, 3 Oct 2007 01:36:54 +0200 "Mojca Miklavec"
wrote: Hello,
I have a document consisting of title page, some introduction which should have pages numbered with roman numerals, and finally the real content
\setuphead[subject][page=odd,style=\ss\bfb] \setuppagenumbering[location=]
\starttext \startstandardmakeup title page \stopstandardmakeup
\startfrontmatter \setuppagenumbering[conversion=romannumerals] \setupfootertexts[page \pagenumber{}] \subject{some intro pages} \input tufte \stopfrontmatter
\startbodymatter \setupfootertexts[page \pagenumber{} of \totalnumberofpages] \dorecurse{10}{\subject{real content} \dorecurse{\recurselevel}{\input knuth} } \stopbodymatter
\stoptext
Now the problems: 1.) The second page starts counting at 1, while counting should start at page 3. This can be solved by using another \startstandardmakeup\strut\stopstandardmakeup.
2.) The last page says "page 26 of 27" - the total page number is indeed 27, but counting started on the second page, so it never reaches the last number.
3.) I would like the page number on the first page of bodymatter to be "page 1 of 23" instead of "page 4 of 27", and the last one to ge "page 23 of 23" instead of "page 26 of 27"
There is some way=bychapter setting for page numering, but in that case there are no suitable chapters/sections available.
Any hints appreciated ...
Thanks a lot, Mojca
Hi Mojca,
maybe I'm a little bit late with my answer
Hello Wolfgang,
I hardcoded the number when I needed it, but you proposal is very useful for the next time when I will need it again. I only need to figure out where to store it on the wiki/texshow, so that it will be possible to find it agin. (This still cannot handle the problem if I wanted to number "last page of frontmatter", but I don't need it at the moment.)
I run into similiar problems for my letter module to reset the page number for every letter in one document without reseting the global pagenumber, I extend my example to use subpagenumber instead of global numbers but I have a problem to get the right number in the table of content because ConTeXt writes the gobal page number in the galley files and ignores the subpagenumber. \startcomponent structure % setups \setupsubpagenumber[way=bytext,state=start] \setuppagenumbering[location=] \startsectionblockenvironment[frontpart] %\setupfootertexts[\convertnumber{r}{\subpagenumber}] \setupfootertexts[pagenumber] \setuppagenumbering[conversion=romannumerals] \stopsectionblockenvironment \startsectionblockenvironment[bodypart] \setuppagenumber[number=1] % else global pagenumbers in the toc \resetsubpagenumber \setupfootertexts[page \subpagenumber{} of \numberofsubpages] \stopsectionblockenvironment \startsectionblockenvironment[backpart] \resetsubpagenumber \stopsectionblockenvironment % the real document \startfrontmatter \completecontent \stopfrontmatter \startbodymatter \dorecurse{12}{\section{Knuth}\input knuth\par} \stopbodymatter \startbackmatter I'm the last page, really? This is true in latest the \CONTEXT\ for \LUATEX\ but not for \XETEX\ and \PDFTEX. \stopbackmatter \stopcomponent Wolfgang