Warning: Constant MULTISITE already defined in /home/pbmalartu/public_html/wp-config.php on line 107

Warning: Constant SUBDOMAIN_INSTALL already defined in /home/pbmalartu/public_html/wp-config.php on line 108

Warning: Constant DOMAIN_CURRENT_SITE already defined in /home/pbmalartu/public_html/wp-config.php on line 109

Warning: Constant PATH_CURRENT_SITE already defined in /home/pbmalartu/public_html/wp-config.php on line 110

Warning: Constant SITE_ID_CURRENT_SITE already defined in /home/pbmalartu/public_html/wp-config.php on line 111

Warning: Constant BLOG_ID_CURRENT_SITE already defined in /home/pbmalartu/public_html/wp-config.php on line 112

Warning: The magic method Pressbooks\Book::__wakeup() must have public visibility in /home/pbmalartu/public_html/wp-content/plugins/pressbooks/inc/class-book.php on line 62
Running Heads & Running Feet (PDF only) – Pressbooks User Guide ="http://www.w3.org/2000/svg" viewBox="0 0 512 512">

Special Formatting

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.

NOTE: We have recently introduced a new method for setting headers and footers in select themes. For more, see our guide chapter on the changes.

License

Share This Book

css.php