Skip to main content

The PreTeXt Guide

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 in Section 5.2, 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 47.
  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 pretext, see Section 5.2. To use options 2 and 3 above, you will need to get a copy of PreTeXt from its GitHub repository
 1 
github.com/PreTeXtBook/pretext
. This can be done using the command git clone https://github.com/PreTeXtBook/pretext.git, 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 46. Information on the use of the PreTeXt script can be found in Chapter 47. These tools are especially useful when developing new features for PreTeXt, so they are housed in the Developer’s Guide.