I would like to add bookmark switches to Table of Contents for a document with several sections. That is, each the document has bookmarks named S1, S2 and S3. In the footer of each section the page numbering follows the total pages for all sections. That is,
The footer of section 1 has the code:
Page { Page } of { = { PAGEREF S1 } + { PAGEREF S2 } + { PAGEREF S3 } }
The footer of section 2 has the code:
Page { = {Page} + { PAGEREF S1 } } of { = { PAGEREF S1 } + { PAGEREF S2 } + { PAGEREF S3 } }
The footer of section 3 has the code:
Page { = {Page} + { PAGEREF S1 } + { PAGEREF S2 } } of { = { PAGEREF S1 } + { PAGEREF S2 } + { PAGEREF S3 } }
Each section shows the total number of pages in the document (the sum of the three sections) and the individual page number of that page within the sections. That is, each section has 2 pages so the footers show:
1 of 6
2 of 6
3 of 6
4 of 6
5 of 6
6 of 6.
The Table of contents, however, does not obey this method. That is, the items on the first page of section 3 are listed as page 1 in the TOC and not page 5.
I have tried { TOC \b S3 \o "1-3" } but that did not work.
Please tell me how to set the field codes so that this would work.