Fixing ebooks in epub format with Calibre. I was going through my collection of ebooks, checking for formatting or hyperlink errors when I realized how space inefficient the books are. Some books are filled with errors.
A typical fiction novel with no graphics will consume around 200KB of space. Add the cover page, some illustrations, the size can balloon to 2-3MB. The cover page needs to be viewable on any device, so it is huge 2000 x 1500 pixels. I read on my Kobo only, therefore the picture can be reduced. Embedded fonts are unnecessary, so away they go.
Some old epubs have all text in bold. Title, major parts, chapter headings, body text all in bold. What an eyesore! If this is controlled in the stylesheet, it is a simple matter of searching for the right selector and deleting “font weight: bold;” If the property value bold is specified in the body text formatting, it is a time-consuming paragraph-by-paragraph editing effort. Time to look for another better version.
Some epubs may come without a table of contents. The table of contents is useful for navigating the book and enables the reader to report progress properly. If the book has major parts, the individual chapters can be collapsed into the relevant parts. Instead of 16 entries, there are just 4 parts that can be drilled down as required. Generating the table of contents will require some understanding of the HTML formatting used. More details on creating table of contents can be found here. link
The chapter headings may need to be lifted from the body text for visual appearance. Some blank lines may need to be added in.
Finally, some books are not closed properly. The story has ended, but there is no closing piece. The end of the book is left hanging. Add a few words like “The End” or more info about the author or other books etc.
<center><i>The End</i></center>