From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/38237 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: page numbers in Table of Contents, mismatch Date: Sun, 23 Dec 2007 19:22:52 +0100 Message-ID: <20071223192252.156178d7.schuster.wolfgang@googlemail.com> References: <20071218170612.GA8581@apcc21.net> 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: ger.gmane.org 1198435628 18549 80.91.229.12 (23 Dec 2007 18:47:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 23 Dec 2007 18:47:08 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Sun Dec 23 19:47:21 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 1J6Vr6-0002fA-GV for gctc-ntg-context-518@m.gmane.org; Sun, 23 Dec 2007 19:47:20 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 954CF1FB57; Sun, 23 Dec 2007 19:46:31 +0100 (CET) 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 11563-03-2; Sun, 23 Dec 2007 19:45:54 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id BA01F1FB33; Sun, 23 Dec 2007 19:45:54 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id BA16A1FB30 for ; Sun, 23 Dec 2007 19:45:52 +0100 (CET) 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 11002-04 for ; Sun, 23 Dec 2007 19:45:19 +0100 (CET) Original-Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.153]) by ronja.ntg.nl (Postfix) with ESMTP id A76061FB38 for ; Sun, 23 Dec 2007 19:23:00 +0100 (CET) Original-Received: by fg-out-1718.google.com with SMTP id e12so789267fga.8 for ; Sun, 23 Dec 2007 10:23:00 -0800 (PST) Original-Received: by 10.86.51.2 with SMTP id y2mr3596203fgy.56.1198434180087; Sun, 23 Dec 2007 10:23:00 -0800 (PST) Original-Received: from rover ( [84.149.112.170]) by mx.google.com with ESMTPS id 12sm3807230fgg.6.2007.12.23.10.22.58 (version=SSLv3 cipher=OTHER); Sun, 23 Dec 2007 10:22:58 -0800 (PST) In-Reply-To: <20071218170612.GA8581@apcc21.net> X-Mailer: Sylpheed 2.4.7 (GTK+ 2.10.14; i686-pc-mingw32) 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:38237 Archived-At: On Wed, 19 Dec 2007 02:06:12 +0900 Saji N Hameed wrote: > Dear ConText gurus, > > I am faced with a new problem with the page numbering in the > Table of Contents. In the appendices, I use: > > \setuppagenumbering > [way=bychapter, > chapternumber=yes, > numberseparator=-] > > to get page numbers like A-15, B-24 ... etc > However, the page numbers associated with Appendix 1 in the Table > of Contents is like > > 1 Introduction 11 > 1.1 Goals of Research 11 > 1.2 Necessity of Research 11 > > A Real-time Monitoring of Intraseasonal Variations 15 > B Drought Monitoring Based on Standardized Precipitation Index 24 > > I am wondering if there is a way to get ConText to write my TOC as: > > A Real-time Monitoring of Intraseasonal Variations A-15 > B Drought Monitoring Based on Standardized Precipitation Index B-24 > > My document is structured as follows: > > \input layout > \starttext > > \startfrontmatter > \input HomePage > \stopfrontmatter > > \placelist[chapter,section] > > \startbodymatter > \input Chapter1 > \input Chapter2 > \stopbodymatter > > \startappendices > \input Appendix1 > \input Appendix2 > \stopappendices > > \stoptext > > Thanks as always, > > saji Please send next time a working example. \usemodule[visual] \def\doMyCommand#1--#2-#3-#4--#5]\relax{{\convertnumber{A}{#3}-#5}} \def\MyCommand#1{\expandafter\doMyCommand#1\relax} \startsectionblockenvironment[appendix] \setuppagenumbering [way=bychapter, chapternumber=yes, numberseparator=-] %\setuplist[section][state=stop] \writebetweenlist[chapter]{\setuplist[chapter] [chapternumber=yes,pagecommand=\MyCommand]} \stopsectionblockenvironment \starttext \startfrontmatter \completecontent \stopfrontmatter \startbodymatter \dorecurse{4} {\chapter{\fakewords{5}{10}} \dorecurse{4} {\section{\fakewords{5}{10}} \dorecurse{2}{\fakewords{100}{150}\par}}} \stopbodymatter \startappendices \dorecurse{4} {\chapter{\fakewords{5}{10}} \dorecurse{4} {\section{\fakewords{5}{10}} \dorecurse{3}{\fakewords{40}{80}}}} \stopappendices \stoptext This is the best solution I found, it is a little bit ugly (llok at the ] in \doMyCommand) but the only working solution. Merry Christmas. Wolfgang ___________________________________________________________________________________ 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 ___________________________________________________________________________________