Forum How do I...?

Display Chapter Title on Each Page

forkjake
Is it possible to have a chapter heading that repeats on every page that the chapter is on? And, is it possible to have the heading change slightly in the event that the chapter continues onto the next page? I need to display the text Continued when a chapter flows to the next page.

Here is an example. Notice the Continued text on the next page.


-------------------
My Interesting Chapter Title
My interesting content that continues on and on.
.
.
.
Many more lines of content for this chapter...

page break occurs

My Interesting Chapter Title (Continued)
More interesting content that is continued from the previous page.
.
.
.
The chapter content continues...
-------------------

I figure that I could either use the header margin or the <thead> construct to repeat the chapter heading. The difficult part is to figure out a way to selectively display the Continued text.

Any ideas?

Thanks,

Frank
kmmv
I just did something almost exactly like this where it would print in the header of the page (with Mike's help, see an earlier topic a few posts down).

@page chapter {
    @top-center {
        content: string(chapter-name) " (continued)";
    }
}
@page chapter:first {
    @top-center {
        content: string(chapter-name);
    }
}
document > chapter {
    page: chapter auto;
}
document > chapter > title {
    string-set: chapter-name content();
}