Tools → Saved searches, then first run the 'normal' set as a normal search and subsequently the 'regex' set as a regular expression
There are several ways to produce an ebook, but all of them generally fall under either of the following two methods:
- Starting from scratch, when you only have the final proofread Word documents available
- Starting from an epub export generated by desktop publishing software such as InDesign (quickest and preferred method)
For both you will need Sigil (https://sigil-ebook.com/) and Calibre (https://calibre-ebook.com/), and a basic knowledge of HTML is required. Adobe Digital Editions is useful for checking the end result: https://www.adobe.com/solutions/ebook/digital-editions/download.html
Method 1: from scratch
- Convert your Word document to HTML (see the separate section on Word conversion).
- Open Sigil and open an existing epub 3.0 template, e.g. the Wellred one, available upon request. You can still use epub 2.0 but we have made the switch to 3.0, which seems to be the standard and is backwards compatible.
- Paste the HTML into the relevant chapters. Make sure formatting for italics is preserved, ideally in <i> or <em> tags. Clean up the HTML as much as possible and avoid needless <span> or <div> tags.
- Add a cover of at least 1500px wide (
Tools → Add cover)
- Generate a Table of Contents (
Tools → Table of Contents → Generate Table of Contents) and edit accordingly.
- For backwards compatibility with older ereaders it is prudent to generate an NCX file:
Tools → Epub3 tools → Generate NCX/Guide for epub 2 e-readers. No need for this step if you use the older format epub 2.0.
- Set the correct metadata in the content.opf file. It is a good idea to have a look at a few Wellred or external examples. Important: set either a unique ISBN or, as we have started doing, simply use a (free) UUID on https://www.uuidgenerator.net/ to get a unique identifier for the ebook. Make sure the UUID is the same in content.opf and the legacy file toc.ncx
- Check the end result in Adobe Digital Editions and make further edits as required
- At this point it is useful to close Sigil and to open Calibre editor for some final tweaking (strictly speaking not necessary, but good practice)
- In Calibre editor set the semantics:
Tools → Set semantics
- For English text we tend to “smarten punctuation” under
Tools → Smarten punctuation
- Remove unused CSS styles (including class attributes)
Tools → Beautify all files(optional)
- Run a final check (
Tools → Check book) and fix any errors. The Wellred template has a few CSS/font errors you can ignore.
- If you publish on Amazon or simply want a Kindle file, you may need to convert the epub file to the mobi format, although as of 2020-2021 Amazon seems to finally embrace the standard epub format. To save space you could delete the fonts altogether as Kindle ignores them anyway. For the actual conversion, use the main Calibre programme (not the editor). Highlight the book, right click,
Convert books → Convert individually. We tend to leave all the default settings, except under MOBI output, where it seems best to select “both” for mobile file type, and remove the Personal Doc tag.
Method 2: from InDesign (preferred)
- Open the InDesign book file (.indb).
- Click on the hamburger icon on the top right and select
Export book to EPUB…Important: select the non-default EPUB (reflowable) as file type (not the fixed one)
- Under export options, select epub 3.0, unless you want to stick with 2.0. Change Navigation TOC to Multi Level (TOC style). Under HTML & CSS it can be useful to add a style sheet at this point (at the bottom
Add style sheet…), e.g. the Wellred template.css file. Make sure to
Include classes in HTMLto keep the formatting, but you can untick
- Once you have an InDesign generated Epub file, you can continue from step 4) under Method 1. It is also possible to start from step 3) if you prefer to work from another template, though that is more time-consuming and generally using good templates from the start saves a lot of time.
- For Wellred, this export from InDesign to final ebook is now almost fully automated by making use of a list of “saved searches” 1), which you can organise in Sigil. By using a series of “find and replace” regular expressions, developed over the years, you can clean up most of the unnecessary/dirty HTML code generated by InDesign in a matter of minutes. (See the separate section on Regular expressions / scripts. There is also a way to use Python scripts within Sigil, as a plugin, to further speed up/optimise everything, although the saved searches seem to work well enough.)
Publishing your ebook
Wellred sells ebooks on its own book store (https://wellredbooks.net/e-books.html) but it is a good idea to try to get your ebook published on commercial platforms as well. Amazon is the most popular (and lucrative) one. Other platforms we use are https://www.smashwords.com/ (which covers Apple Books and Kobo) and Google directly (through the Google Partner Centre, which pushes the books to both Google Play and Google Books).