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. Documentation appears here shortly, and throughout the Guide as needed.

  2. The PreTeXt script: a Python script that has a variety of utilities to process your source. Requires Python 3.6 or later. In rare cases this may be needed to test new features that have not yet been exposed in the PreTeXt-CLI. See Chapter 45.

  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. Demonstrations of use in this Guide are being phased-out.

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 1 . 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 xsltproc in Chapter 44. Information on the use of the PreTeXt script can be found in Chapter 45. These tools are especially useful when developing new features for PreTeXt, so they are housed in the Developer's Guide.