ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* page numbers in Table of Contents, mismatch
@ 2007-12-18 17:06 Saji N Hameed
  2007-12-23 18:22 ` Wolfgang Schuster
  0 siblings, 1 reply; 3+ messages in thread
From: Saji N Hameed @ 2007-12-18 17:06 UTC (permalink / raw)
  To: ntg-context

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

-- 
Saji N. Hameed

APEC Climate Center          				+82 51 668 7470
National Pension Corporation Busan Building 12F         
Yeonsan 2-dong, Yeonje-gu, BUSAN 611705			saji@apcc21.net
KOREA
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: page numbers in Table of Contents, mismatch
  2007-12-18 17:06 page numbers in Table of Contents, mismatch Saji N Hameed
@ 2007-12-23 18:22 ` Wolfgang Schuster
  2007-12-25  0:04   ` Saji Hameed
  0 siblings, 1 reply; 3+ messages in thread
From: Wolfgang Schuster @ 2007-12-23 18:22 UTC (permalink / raw)
  To: ntg-context

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
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: page numbers in Table of Contents, mismatch
  2007-12-23 18:22 ` Wolfgang Schuster
@ 2007-12-25  0:04   ` Saji Hameed
  0 siblings, 0 replies; 3+ messages in thread
From: Saji Hameed @ 2007-12-25  0:04 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- 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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-12-25  0:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-18 17:06 page numbers in Table of Contents, mismatch Saji N Hameed
2007-12-23 18:22 ` Wolfgang Schuster
2007-12-25  0:04   ` Saji Hameed

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).