Skip to main content

Section 29.2 Converting and validating

Converting to EPUB with SVG math (used everywhere other than Kindle), run as a single command-line

/path/to/mathbook/pretext/pretext -c all -f epub-svg
    -p publication.xml -d /path/to/output
    -o mybook-svg.epub /path/to/yourmainfile.ptx

For an EPUB file destined for Kindle, use the single command-line

/path/to/mathbook/pretext/pretext -c all -f epub-kindle
    -p publication.xml -d /path/to/output
    -o mybook-kindle.epub /path/to/yourmainfile.ptx

For the epub-svg conversion, any standard EPUB reader should work. macOS users will find the Apple Book app is likely their default. Calibre is useful for an alternative view and works on Windows and Linux as well. For the epub-kindle conversion, you will need to get Amazon's Kindle Previewer app 1  (macOS and Windows only). For reasons we do not understand, some books crash the Kindle Previewer app, in which case you should try loading the EPUB file into the Amazon KDP web interface, which also offers a preview. (This preview is the only option for Linux users.)

www.amazon.com/gp/feature.html?ie=UTF8&docId=1000765261

Many EPUB marketplaces are strict about requiring that your EPUB file pass validation by the open source epubcheck validation tool. You may be able to install a command-line version of epubcheck using your operating system's package management tool. A free Java-based GUI version released by Pagina 2  might be useful. There is also a (slow, limited) online version. More pointers can be found at the W3 EPUBCheck 3  site. Please report validation errors and oddly-formatted electronic book output to the pretext-support Google group. Some aspects of PreTeXt have not yet been fully implemented for EPUB, but we will endeavor to support them as demand arises.

www.pagina.gmbh/produkte/epub-checker/
www.w3.org/publishing/epubcheck/