Forum How do I...?

Getting page ranges for chapter

speck
My problem is similar to this:

Suppose you're creating a book. It will contain a TOC, then chapter 1, chapter 2, ... chapter 10. Each page contains a "Page x of y" footer.

Now I want to (re)print only chapter 3. If I hide the other pages using "display: none", then the page counter will be wrong (it will say page 1 for first page of chapter 3).

I'd really like an 'display: omit' option that keeps the pages when doing layout, but omits the page when generating the pdf.

As a workaround, if I could get the page range for chapter 3, then I could extract the page range using e.g. pdflib (pdflib.com). But how do I find the page range? Would it be possible to add a css option that makes princexml log the page number of the matching element to stderr?

E.g.
<style>h1.chapter3 { prince-log: "Ch3 starts on page " counter(page); }</style>
<h1 class=chapter3>Chapter 3</h1>
jim_albright
I've encountered a similar problem and found that by making the
font-size: 0 ;
that the text did not display. Check and see if the page numbers work with this. I don't know. It may be a work around for you.

Jim Albright
Wycliffe Bible Translators

speck
I've found a solution: generating carefully named bookmarks.