4. Styling an ebook

The ebook you'll generate using submenu Ebook > Convert Document is styled using CSS stylesheets.

Creating a good CSS stylesheet for your ebook is really a required step. Without this CSS stylesheet, the ebook you'll generate would be very poorly formatted. More information in Primer, Nicely formatted books.

The goods news is that the CSS styles specified in the ebook specification and in the source HTML pages are also used when generating output formats like PDF, RTF, DOCX, even if these formats are not directly related to HTML and CSS.

You'll find a CSS stylesheet template in XXE_install_dir/doc/ebook/css/template.css.

Alternatively, you may use the XMLmind CSS stylesheet XXE_install_dir/doc/ebook/css/xmlmind_ebook.css as is for your own ebooks. You may also use the XMLmind stylesheet as a starting point for developing your own CSS stylesheet. In both cases, make sure to add the following links to the headcommon element of your root book element:

  <html:link href="css/xmlmind_ebook.css" rel="stylesheet"
  <html:link href="css/icons/" rel="resource"