4. Styling an ebook
The ebook you'll generate using submenu Ebook > Convert Document is styled using CSS stylesheets.
Adding a good CSS stylesheet to your ebook is really a required step. Without this CSS stylesheet, the ebook you'll generate would be very poorly formatted.
Two goods news though:
- Setting attribute
includebasestylesheet
of elementbook
to "true
" guarantees to effortlessly create a nicely formatted book. More information about this attribute in Leveragingbase.css
, the stock CSS stylesheet.Alternatively, you may want to use a custom CSS stylesheet developed from scratch, starting from the template found in
ebookc_install_dir/doc/manual/template/skeleton.css
. In this case, as explained in Nicely formatted books, make sure to add this kind of link to theheadcommon
element of your rootbook
element:<headcommon> <html:link href="my_custom_stylesheet.css" rel="stylesheet" type="text/css"/> </headcommon>
- 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.