Skip to main content

The PreTeXt Guide

Section 46.7 Images Described in Source

As we discussed in Section 5.8 , there are many advantages to describing images directly in the source of your PreTeXt document. However, these must be processed with various “helper” programs such as asy,pdflatex, and sage.
The issue with this is that XSL is not a general purpose programming language, and so in particular, cannot call the “helper” programs. The general strategy is to use XSL to identify and isolate the parts of a document that lie in the elements designed for graphics languages. A Python script, the pretext script, employs these XSL stylesheets and then feeds each image file to the appropriate helper program.
This script has a variety of options, so we document it fully in Chapter 47 .