Forum How do I...?

Adding a header to only certain pages

abaker87
I am trying to add a header to only certain pages in my Table of Contents/Table of Authoritites.

Heres my structure:

TOC (1 or more pages)
TOA (1 or more pages)

TOC and TOA use the same counter for page numbering.

I am trying to add a "Table of Contents" header to the first ToC page, And a "Table of Contents - Continued" Header to every other toc page.

Same goes for the Table of Authorities.

I know I can add a header "Table of Contents - Continued" to every page and then write a different header "Table of Contents" to the first page. But this doesnt let me choose "Table of Contents" or "Table of Authoritites" depending on the page.

Any ideas?





mikeday
Use different named pages for TOC and TOA, and prince-page-group: start so that you can use the :first page selector to change the header:
@page toc-page { @top { content: "TOC continued" } }
@page toc-page:first { @top { content: "TOC" } }

@page toa-page { @top { content: "TOA continued" } }
@page toa-page:first { @top { content: "TOA" } }

div.toc {
    page: toc-page;
    prince-page-group: start
}

div.toa {
    page: toa-page;
    prince-page-group: start
}
abaker87
Thanks for the quick response.

But wont this use a different page counter for toa/toc?

I need ToA and ToC to use the same counter for pagination.

ie.
ToC - gets a footer with page 1
ToA - gets a footer with page 2


mikeday
The page counter is independent of named pages, so as long as you don't explicitly reset the page counter it will be fine.