General features and styles for body text in EPUB and web ebooks
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
- preliminary matter—display separator line after title page and imprint page
- tables of contents—change position of part title page TOC and introduction
- punctuation in part and chapter titles—punctuation between prefix and label number, and
label number and title
- section label numbering—display chapter number and label number, maximum level for
numbering, punctuation between label number and title
- graphics—embed scalable vector graphics (SVG), scaling of images, generate viewport
- variablelist—format as a table or block paragraph.
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
- 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
<?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).