Adding TeX4ht to Your LaTeX Book Project

Here, we will examine the technical details of converting LaTeX to HTML, and how to add that capability to an existing project that does not use the template. If you are already using the configuration set up by the template, you can safely ignore this chapter.

Publishing on Leanpub

As an alternative to Amazon and Google, you could try out the platform “Leanpub.” Leanpub is designed to provide you with just enough to get your book properly published, marketed, and sold. You can read more about how Leanpub applies Agile principles at In this section, I will compare Leanpub to Amazon and Google.

Publishing on Google Play

While Amazon KDP is the current market leader, it might be worthwhile to also publish your book on other platforms. One alternative (only for e-books at this time) is Google Play, where people can buy directly from their pre-installed “Books” application on their Android smartphone (or online on their computers).

How to Create Cover Graphics

Cover graphics are separate from the LaTeX project. You can neither create a cover graphic in LaTeX nor include it in your project. Instead, you need to use an external program to design it. I can give you only a technical guideline and some ideas. I recommend hiring a designer to produce the final version. If you are somewhat proficient with a graphics editor, the following sections can get you started with your cover.

Publishing Your Book on Amazon KDP

Publishing on Amazon KDP is relatively straightforward once you have the MOBI file, or the PDF file (for the print release) ready (this is discussed in the book Better Books with LaTeX the Agile Way in detail).

Polishing for E-book Release

Polishing for an e-book release is significantly easier than for a PDF print release. This is because the reading software or device on which your book is displayed for the reader reformats your book to fit correctly on a particular screen. Also, printed books have individual pages, while e-books do not. Your e-book’s contents are handled like a one-page website where you simply scroll from top to bottom.

woman typing

Polishing a Book for Print

While using LaTeX can save you a lot of time by automatically formatting each page, it has its limits. For example, you might end up finishing a section or chapter with one line that ends up alone on a page. This is ugly but it is not something LaTeX can do anything about. The program’s hands are tied because it cannot rewrite the text for you. It will display every line—even if the final line in a chapter is “orphaned.”

The LaTeX Book Template

In a previous article (and the book), we we have covered the main, front, and the back chapter folders of the LaTeX Book Template. You can find the Overleaf template here as a free download. Now we will discuss those folders again in more detail and go through the remaining folders. This will help you to know where the …

Bibliography and Citations in LaTeX

Books build upon other books, just like scientific experiments build on other scientific experiments. Be it out of scientific accuracy, as a service to the interested reader, or out of gratitude, you should include references to your sources.