Skip to main content

Section 5.1 Options for Processing

There are currently three supported options for converting (processing) your source:

  1. The PreTeXt-CLI: very easy and friendly, but somewhat limited in customization. Requires Python 3.8 or later.

  2. The PreTeXt script: a python script that has a variety of utilities to process your source. Requires Python 3.7 or later.

  3. xsltproc: an executable program that directly converts XML using a specified XSL file. Requires xsltproc, which is easily available on Linux and MacOS, but harder to install on Windows.

The PreTeXt-CLI, can be installed on the command-line using the command pip install pretextbook, see Section 2.1. To use options 2 and 3 above, you will need to get a copy of PreTeXt from its GitHub repository. This can be done using the command git clone, or by downloading a zip file directly from the repository.

Wherever the functionality of the PreTeXt-CLI allows it, instructions in this guide will use that method. We will collect corresponding processing instructions using xsltrpoc in Chapter 43. Information on the use of the PreTeXt script can be found in Chapter 44. These tools are especially useful when developing new features for PreTeXt, so they are housed in the Developer's Guide.