Skip to main content

The PreTeXt Guide

Subsection 2.2.7 Using this guide and advanced features

The rest of this guide will help you on your way. However, keep in mind that this guide is the work of many volunteers over many years, and certain sections may assume the reader is using mechanisms for writing PreTeXt that have been around for much longer than the Codespaces environment recommended for this tutorial.
In particular, there are two advanced mechanisms used by many PreTeXt authors: the PreTeXt developer script Chapter 47 (i.e. the pretext/pretext script) and the PreTeXt CLI Section 5.2.
Under the hood, the PreTeXt CLI is what you’re using in Codespaces, and it also has the ability to call the PreTeXt developer script as well. If you ever want to use a PreTeXt CLI command, you can open a Terminal in your Codespace using the menus, or by pressing Ctrl+` (the backtick key, found in upper left of many keyboards).
From the terminal, you can type in any PreTeXt CLI commands directly. For example, typing in the CLI command pretext build web and running it by pressing Enter builds the web target.
Screenshot of using the PreTeXt CLI within Codespaces
Figure 2.2.7.5. Using the PreTeXt CLI with a Codespaces terminal
The CLI should be sufficient to do nearly everything you want to do for your project, and using the developer script should be exercised with caution. Nonetheless, to access a pretext/pretext developer script feature, you can use pretext devscript. For example, if the documentation suggests a command like pretext/pretext -foo bar, you could try running pretext devscript -foo bar.