52 Running Heads & Running Feet (PDF only)
Running heads in the PDF are set using the content: string(); function in CSS. The available content strings are:
book-title
book-subtitle
book-author
book-publisher
book-publisher-city
part-number
part-title
chapter-number
section-title
(note this is: frontmatter/chapter/backmatter title OR short-chapter-title if such a thing exists)chapter-author
chapter-subtitle
You can add arbitrary strings using the string-set CSS function. But, if you use the above strings with Pressbooks, everything should be OK.
You might want to edit how numbers appear as well. To do this you should use:
counter(page)
The CSS where they define running heads & feet should look something like this:
@page chapter:left {
@top {
content: string(book-title);
counter-increment: part;
text-align: center;
font-weight:normal;
font-style: normal;
font-size: 0.8em;
}
@bottom {
content: counter(page);
text-align: center;
font-weight:normal;
font-style: normal;
}
}
@page chapter:right {
@top {
content: string(section-title);
text-align: center;
font-weight:normal;
font-style: normal;
font-size: 0.8em;
}
@bottom {
content: counter(page);
text-align: center;
font-weight:normal;
font-style: normal;
}
}
Note that different kinds of pages can be styled differently, so you might have:
@page frontmatter:right {
@top {
content: "";
}
@bottom {
content: counter(page, lower-roman);
text-align: center;
font-weight: normal;
font-style: italic;
font-size: 0.7em;
}
}
… which will style front-matter differently than chapters.
The areas on a page that can be styled in this way are:
Headers
@top-left-corner
@top-left
@top or @top-center
@top-right
@top-right-corner
Footers
@bottom-left-corner
@bottom-left
@bottom or @bottom-center
@bottom-right
@bottom-right-corner
For more info, visit the PrinceXML User Guide: Page Headers and Footers.