From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/36870 Path: news.gmane.org!not-for-mail From: Peter Rolf Newsgroups: gmane.comp.tex.context Subject: Re: standardmakeup, frontmatter, bodymatter & page numbering Date: Wed, 03 Oct 2007 20:51:24 +0200 Message-ID: <4703E4AC.8000006@gmx.net> References: <6faad9f00710021636i6898d8a8n47c5a93e55751928@mail.gmail.com> <470374E2.2030807@gmx.net> <6faad9f00710031033j555b7609pb9ff2caa08ddf26f@mail.gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1191437519 8381 80.91.229.12 (3 Oct 2007 18:51:59 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 3 Oct 2007 18:51:59 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed Oct 03 20:51:56 2007 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1Id9K0-0006AM-5v for gctc-ntg-context-518@m.gmane.org; Wed, 03 Oct 2007 20:51:48 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 8F5BA1FDC8; Wed, 3 Oct 2007 20:51:43 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 26923-01-10; Wed, 3 Oct 2007 20:51:35 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 112391FC51; Wed, 3 Oct 2007 20:51:35 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 9C94D1FC51 for ; Wed, 3 Oct 2007 20:51:30 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 26923-01-9 for ; Wed, 3 Oct 2007 20:51:23 +0200 (CEST) Original-Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by ronja.ntg.nl (Postfix) with SMTP id 314111FB89 for ; Wed, 3 Oct 2007 20:51:23 +0200 (CEST) Original-Received: (qmail invoked by alias); 03 Oct 2007 18:51:22 -0000 Original-Received: from i577AEAA4.versanet.de (EHLO [192.168.1.3]) [87.122.234.164] by mail.gmx.net (mp045) with SMTP; 03 Oct 2007 20:51:22 +0200 X-Authenticated: #24293357 X-Provags-ID: V01U2FsdGVkX1+zXw4dEayzXxH0Kg9xlqst9Aao67xMTYPJArEckW uvPZuPcdFrofdr User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) In-Reply-To: <6faad9f00710031033j555b7609pb9ff2caa08ddf26f@mail.gmail.com> X-Enigmail-Version: 0.95.3 X-Y-GMX-Trusted: 0 X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.9 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:36870 Archived-At: Mojca Miklavec schrieb: > On 10/3/07, Peter Rolf wrote: >> Mojca Miklavec schrieb: >>> 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 ... >>> >> Hi Mojca, >> >> see >> http://www.pragma-ade.com/general/magazines/mag-0002.pdf >> >> (Page ranges) for the details. > > Thanks a lot for the pointer. But the following example fails: > > \setuppagenumbering > [location=] > \setupsubpagenumber > [state=start] > \setupfootertexts > [page \subpageno{} of \nofsubpages] > > \starttext > abc > \stoptext > > ! Missing number, treated as zero. > > { > page \subpageno { > } of \nofsubpages {}{}{} > \firstoftwoarguments #1#2->#1 > > \doattributes ...sname #1#2\@EA \endcsname \fi {#4 > }\dostopattributes > \dosingletexts ...atetexts {#1#2#5}{#6{}{}{}}}}}}} > \egroup > ...tk \v!footer \v!text \c!middletext } > \hss }\hskip -\makeupwidth... > ... > l.11 \stoptext > I guess the standard activation of that mechanism is 'bychapter', so there is no initialisation (withount a \chapter). If you use "way=bytext" it should (hopefully) work. This is taken from my letter environment. It's from 2003 and I don't remember any details... \def\MySubpagerange#1{% \ifnum\nofsubpages>1 \ifnum\numexpr\subpageno+1\relax<\nofsubpages {\ss\tfx\the\numexpr\subpageno+1\relax\,-\,\nofsubpages} \else \ifnum\numexpr\subpageno+1\relax=\nofsubpages\relax {\ss\tfx\nofsubpages}\fi \fi \fi } % show subpagenumber in the right footer margin, if more than one page is used \setuppagenumbering[ location={footer,margin}, command=\MySubpagerange, ] \setupsubpagenumber[way=bytext] % show (sub)pagenumber in header ( no pagenumber at page 1) \setupheadertexts[{\ifnum\subpageno>1 \the\subpageno\fi}] \setupheader[style=small, state=high] > Plus, I don't know how to instruct "way=by..." to reset the counter at > the boundary of frontmatter/bodymatter > It's only a counter, so (if there is no parameter support for your environment) you are free to reset it whenever you want. Just add some code to the 'before|after' parameter of front|bodymatter. HTH, Peter > Thanks a lot, > Mojca > ___________________________________________________________________________________ > If your question is of interest to others as well, please add an entry to the Wiki! > > maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://tex.aanhet.net > archive : https://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > ___________________________________________________________________________________ > ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________