This is an excerpt of the book “Better Books with LaTeX.” The book comes with a LaTeX template you can use to easily create your own books.
Polishing for an e-book release is significantly easier than for a PDF print release. This is because the reading software or device where your book is displayed for the reader reformats your book to fit specifically on a particular screen.
Also, printed books have individual pages, while e-books do not. Your book’s contents are handled like a one-page website where you simply scroll from top to bottom. As there is also no index, once you have finished the last section, you are ready to release your texts as an e-book.
If you plan to release your book as an e-book as well as releasing a print version (which I recommend), you should first finish and release the e-book version and then work on polishing the print version. This is because there are additional steps required for the print version (like cleaning up empty pages or creating the index, see Chapter 8 and Chapter 5).
Text can easily fit on any screen because it is very flexible, but images are not. They are not reinterpreted and adapted to a specific device; rather they are simply scaled to fit into the reader’s screen. In addition, text does not lose quality when being adapted to a certain screen resolution, while image quality might suffer significantly.
In contrast to what I have said in the previous section 8.3, for e-books, lossy JPG files are preferred because on Amazon, you will not pay by page, but by the file size of the e-book for each download. In addition, you should also use low resolution images (300 dpi) as the device on which the image will be shown will most likely have a low resolution, too. One major difference between e-books and printed books is that you can get color for free, at least on some devices. On other devices, all graphics are converted to grayscale versions. Here, it is up to you, if you want to provide an extra service for owners of more modern devices (or who read the book on smartphones), or have print and electronic versions of your book identical when it comes to graphics. If you decide on grayscale images, you will save around a third of the file size. For example, this photo of the Milky Way has a size of 328kb in color, but only 250kb in grayscale (see Figure 9.1).
Another difference is scaling. For the print version, you are able to use \adjustbox to fit it into the width and height of the image. For the e-book version, images are scaled automatically to the width of the screen. While this saves you the work of scaling it yourself, you might end up with images larger than intended in those cases where you have scaled down the picture in the PDF version. For all TikZ graphics, this was configured in the lib/inittikz.tex file (see Chapter 6.1.8): all TikZ graphics are automatically converted to PNG files with a fixed width (1245 pixels by default). Instead of being scaled up, the transparent background of smaller graphics is simply extended. For smaller graphics you include from external sources (JPG, PNG, EPS, PDF), you should make sure that they have sufficient empty space left and right of the image. This ensures that they are not distorted during the e-book conversion process. Larger images for which you are already using the full width of the page in the print version do not have to be edited as they will be scaled down automatically. Alternatively, make it a rule for yourself to not use \adjustbox in the print version and instead do all the scaling manually by editing the image. The benefit of this approach is that you do not need a separate e-book version of your images in order to ensure that fonts and lines have the same sizes and thickness throughout your book. This consistency improves the quality of your book.