Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
publishing:digital:ebook [2021/03/20 08:39] – [Method 1: from scratch] maartenpublishing:digital:ebook [2024/02/14 12:20] (current) – external edit 127.0.0.1
Line 8: Line 8:
 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 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 ======+===== Method 1: from scratch =====
  
-  - Convert your Word document to HTML (see [[publishing:digital:word_conversion|Word conversion]]).+  - Convert your Word document to HTML (see the separate section on [[publishing:digital:word_conversion|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.   - 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.   - 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.
Line 18: Line 18:
   - 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   - 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   - Check the end result in Adobe Digital Editions and make further edits as required
-  - Validate your epub file at http://validator.idpf.org/ (or this site) and fix any errors it generates. Your book will be rejected from most commercial platforms if you have any errors here.+  - Validate your epub file at http://validator.idpf.org/ (or [[https://www.ebookit.com/tools/bp/Bo/eBookIt/epub-validator|this site]]) and fix any errors it generates. Your book will be rejected from most commercial platforms if you have any errors here.
   - 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)   - 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''   - In Calibre editor set the semantics: ''Tools -> Set semantics''
Line 24: Line 24:
   - Remove unused CSS styles (including class attributes)   - Remove unused CSS styles (including class attributes)
   - ''Tools -> Beautify all files'' (optional)   - ''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. +  - 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.+  - 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) ======+===== Method 2: from InDesign (preferred) =====
    
-Open the InDesign book file (.indb). +  - Open the InDesign book file (.indb). 
-Select all the chapters, which looks a bit like this:+  Select all the chapters, which looks a bit like this:{{:publishing:digital:epub-export.jpg|}} 
 +  - 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 HTML'' to keep the formatting, but you can untick ''Generate CSS'' 
 +  - 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” ((Available in this document: {{ ::publishing:digital:sigil_searches.odt |}}Save as a plain text .ini file and then import it under ''Tools -> Saved searches'', then first run the 'normal' set as a normal search and subsequently the 'regex' set as a regular expression)), 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 [[:regex|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.)
  
-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) +===== Publishing your ebook =====
-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 HTML” to keep the formatting, but you can untick “Generate CSS” +
-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” (available upon request), 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.)+
  
-====== 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.
- +
-Wellred sells ebooks on our 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). 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).