[NTG-context] Getting ToC to match page numbering

Duncan Hothersall dh at capdm.com
Mon Aug 1 15:39:43 CEST 2005

I have three issues where page number formatting in the table of
contents is wrong compared to the pages themselves:

1. The separator character in the actual pagenumbers is "/". In the ToC
it displays as a "-".

2. I used "left=A" on the pagenumbering command in the appendices
because appendices are numbered A1, A2 etc. This gives the required
output for the actual pagenumbers, but there is no 'A' prefix in the ToC.

3. Similarly in the backmatter I have added a 'I/' prefix to the
pagenumber ("left={I/}"), which works on the pages but is not reflected
in the ToC.

The overall question is how to get each of these page numbering features
repeated in the table of contents?

Thanks. Minimal file follows.



%% Tested on live.contextgarden
%% change appendix numbering from Character to numbers
%% define new chapter-like heads for different sections
%% set up individual content lists and labels
\setuplabeltext[en][chapter={Module }]
\setuplabeltext[en][Appchapter={Appendix }]
%% set up the combined list
%% page numbering is output using the explicit \completepagenumber
%% command in the footer because the final output has rather
%% complicated footers which incorporate the page number.
%% page numbering is set up for each section
\Frontchapter{Test Intro}
\dorecurse{3}{\input tufte\par}
%% for the body and appendices we prefix the chapternumber and a '/'
\chapter{Test Chapter}
\dorecurse{3}{\input tufte\par}
\chapter{Another Test Chapter}
\dorecurse{3}{\input tufte\par}
\Appchapter{Test Appendix}
\dorecurse{3}{\input tufte\par}
%% for the backmatter we just prefix I/ (it's going to be the index)
\dorecurse{3}{\input tufte\par}


More information about the ntg-context mailing list