On Wed, 19 Dec 2007 02:06:12 +0900
Saji N Hameed <[EMAIL PROTECTED]> 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 : [email protected] / 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
___________________________________________________________________________________