From: Saji Hameed <saji@apcc21.net>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: page numbers in Table of Contents, mismatch
Date: Tue, 25 Dec 2007 09:04:52 +0900 [thread overview]
Message-ID: <BD5E5AAC-86C1-408D-BD2A-C6F996034845@apcc21.net> (raw)
In-Reply-To: <20071223192252.156178d7.schuster.wolfgang@googlemail.com>
[-- Attachment #1.1: Type: text/plain, Size: 3269 bytes --]
On Dec 24, 2007, at 3:22 AM, Wolfgang Schuster wrote:
> On Wed, 19 Dec 2007 02:06:12 +0900
> Saji N Hameed <saji@apcc21.net> 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
Dear Wolfgang,
Thanks as always.
Wish you a Merry Christmas and a Happy 2008,
saji
> ______________________________________________________________________
> _____________
> 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
> ______________________________________________________________________
> _____________
[-- Attachment #1.2: Type: text/html, Size: 18312 bytes --]
[-- Attachment #2: Type: text/plain, Size: 487 bytes --]
___________________________________________________________________________________
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
___________________________________________________________________________________
prev parent reply other threads:[~2007-12-25 0:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-18 17:06 Saji N Hameed
2007-12-23 18:22 ` Wolfgang Schuster
2007-12-25 0:04 ` Saji Hameed [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=BD5E5AAC-86C1-408D-BD2A-C6F996034845@apcc21.net \
--to=saji@apcc21.net \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).