Begin by creating a file that is a new XSL stylesheet. You can likely safely copy a mature one from the xsl/latex directory. Be certain to keep the first few declarations. The <xsl:import> is critical, since it will “pull in” all the basic code for the PreTeXt conversion to . You will be overriding and appending to that code (which PreTeXt has made straightforward). You can start with an absolute path from your filesystem root, but once public a relative path will be necessary. Remove all of the <xsl:template> elements, leaving a hollow shell to begin working with.