Skip to main content

Section 30.1 Prerequisites

There are a handful of prerequisites to build an EPUB version of a book:

  • You must use a publisher file (referred to below as publication.xml) with

    source/directories/@generated
    and
    source/directories/@external
    so that images can be located and bundled. The publisher file must also have epub/@cover that points to a cover image (JPEG or PNG, 2560 pixels tall, 1600 pixels wide).

  • If the book has images generated by the pretext/pretext script, SVG format must be produced for standard EPUB and PNG format must be produced for Kindle.

  • node and npm must be installed. See Section F.1 for more on node and npm.

  • You must install a local version of MathJax. We provide a bash script in scripts/mjsre that automates this process. See Section F.2 for instructions.

Furthermore, builds will need to use the pretext/pretext script, since creating an EPUB file is a multi-stage process; building with xsltproc is not supported.

As updates to the EPUB conversion are released, you may occasional want to update your local copy of MathJax. Simply use the script referenced above.