Text formats for EPUB and web

General features and styles for body text in EPUB and web ebooks

Display graphics for EPUB and web text formats

The stylesheet c4-epubwebtextformats.xsl has features and instructions to set up some styles for text formats in several book components. The text formats that can be set in the stylesheet are:

Other text formats for EPUB and web pages can be specified in processing instructions within the XML markup, or in cascading stylesheets (CSS).

XML markup to edit

Format of variable lists. There are options to mark up a glossary or list of acronyms in XML using either:
  • the <glossentry> element (and associated elements)
  • the <variablelist> element.
If using the <variablelist> element, there are options to format the list as:
  • a two-column table
  • a block paragraph.
When the format of a <variablelist> element is a two-column table (set at stylesheet feature c4-65), you specify the width of the table and width of the term by using a processing instruction. You need to add the processing instruction immediately inside a <variablelist> element. The processing instruction specifies:
  • term width (the width of the first column)
  • list width (the width of the table).
An example processing instruction is:
<?dbhtml term-width="15%" list-width="100%"?>

At the beginning of the processing instruction, the letters dbhtml mean that the table widths will only apply to the ebook formats of EPUB and web pages. The attribute term-width specifies the relative width (in any units of measurement) of the first column in the table, which contains the terms of a glossary or the acronyms for a list of acronyms. The attribute list-width specifies the width of the whole table (in any units of measurement).

Stylesheet settings to edit

The relevant Stylesheet Guide page to set up text formats for EPUB and web pages is EPUBweb-textformats.svg.