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).
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).

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/
Infos
- W3Schools: https://www.w3schools.com/Css/
« Previous 1 2
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
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.
News
-
Zorin OS 17 Beta Available for Testing
The upcoming version of Zorin OS includes plenty of improvements to take your PC to a whole new level of user-friendliness.
-
Red Hat Migrates RHEL from Xorg to Wayland
If you've been wondering when Xorg will finally be a thing of the past, wonder no more, as Red Hat has made it clear.
-
PipeWire 1.0 Officially Released
PipeWire was created to take the place of the oft-troubled PulseAudio and has finally reached the 1.0 status as a major update with plenty of improvements and the usual bug fixes.
-
Rocky Linux 9.3 Available for Download
The latest version of the RHEL alternative is now available and brings back cloud and container images for ppc64le along with plenty of new features and fixes.
-
Ubuntu Budgie Shifts How to Tackle Wayland
Ubuntu Budgie has yet to make the switch to Wayland but with a change in approaches, they're finally on track to making it happen.
-
TUXEDO's New Ultraportable Linux Workstation Released
The TUXEDO Pulse 14 blends portability with power, thanks to the AMD Ryzen 7 7840HS CPU.
-
AlmaLinux Will No Longer Be "Just Another RHEL Clone"
With the release of AlmaLinux 9.3, the distribution will be built entirely from upstream sources.
-
elementary OS 8 Has a Big Surprise in Store
When elementary OS 8 finally arrives, it will not only be based on Ubuntu 24.04 but it will also default to Wayland for better performance and security.
-
OpenELA Releases Enterprise Linux Source Code
With Red Hat restricting the source for RHEL, it was only a matter of time before those who depended on that source struck out on their own.
-
StripedFly Malware Hiding in Plain Sight as a Cryptocurrency Miner
A rather deceptive piece of malware has infected 1 million Windows and Linux hosts since 2017.