Designing ebooks with free software

Working with CSS

To gain full control over formatting, you will need to work with CSS, which is used in both the content files and the stylesheets in the ebook. Some features, like tables or multiple columns, can only be added to ebooks through CSS, although the easiest choice might be to avoid such features altogether.

Some CSS tags, like those for lists, are identical to those for plain HTML. However, you will probably need to learn more to edit your ebooks. W3Schools [1] has some tutorials that include an introduction to CSS's structure and pages for CSS tags that you can experiment with online. Both are first-rate resources that can quickly bring you up to speed (Figure 4).

Figure 4: W3Schools offers extensive interactive tutorials on CSS.

At first, Calibre may seem like a crowded environment for editing text files. However, when a text file displays in the Edit book window, the Live CSS pane to the right of the text pane shows an enlargement of the code at the cursor's current position. You can also close other panes to give the text pane more room. Alternatively, you can use a CSS editor like Sigil to copy and paste into Calibre.

Finishing Touches

When your ebook is ready, Calibre offers some final touches in the Edit book window. Some of the most useful features are in the Tools menu (Figure 5).

Figure 5: Calibre's Tools menu contains many of the tools for applying finishing touches to an ebook.

You can:

  • Edit the text in the separate files that Calibre creates during conversion.
  • Create and edit a TOC (although doing so in the LibreOffice raw file is easier).
  • Delete or edit images. To update an image, simply give the new image the same name as the original. To add an image, you will have to add the CSS for it (see below).
  • Edit or add stylesheets. CSS knowledge is required.

When you are finished editing to your satisfaction, Edit book | Tools offers functions to put the final polish on your ebook:

  • Smarten punctuation: Add smart or curly quotation marks.
  • Compress images losslessly: Reduce file size while keeping high-quality images.
  • Check spelling: Spell checking is organized by word, not paragraphs. CSS tags are omitted. Work with the Writer source file open for reference.
  • Check book: Validate the structure of the ebook. Results display at the top of the window. You can then attempt to correct errors.

You may need several tries to produce an ebook to your highest standards, but, with LibreOffice Writer, Calibre, and a little patience, you can get far better results than from most online conversion tools. If you are lucky, you may even be able to do so with only the CSS knowledge learned from existing examples.

Bruce Byfield goes into more detail about producing ebooks in"Designing eBooks with Free Software," which is available as a free download from https://www.designingebooks.com/download-buy/

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More

News