Section M.3 Updating docinfo, the publication file, and the project manifest
Open both your original
publication.ptxfile, and the one created by the
pretext initcommand. The file created by
pretext initwill contain some directory management details, such as:
<source webwork-problems="../generated-assets/webwork/webwork-representations.xml"> <directories external="../assets" generated="../generated-assets"/> </source>
If your publication file did not already have a
<source>element, copy this from the auto-generated publisher file into your own. If it does, adjust your existing content to match the director structure needed by the PreTeXt-CLI.
When this is done, replace the publication file created by
pretext initwith your own.
<brandlogo>, you may need to change the
logo.pngis the name of the file used for your brand logo. This assumes that the file you use for your brand logo is contained in
Next, we need to update the
project.ptxfile that was created by
pretext init. Opening the file, you will see there are several components:
subsetcomponent is quite useful for editing: specify an
xml:idfrom your book (such as a chapter or section), and you can use the command
pretext build subsetto do a partial build of your project.
In each component, ensure that the
<source>tag points to the top level file of your project. By default, this is
source/main.ptx, but if you kept a different file name during the step in Section M.2, you will need to change this line to point to the correct file.
Similarly, ensure that the
<publication>tag points to the correct publication file.
If you use any string parameters that cannot be transitioned to the publisher file, you can add them in your
project.ptxmanifest. For example, if you have WeBWorK problems and use the static preview feature, your
xsltprocexecutable would have contained
--stringparam webwork.divisional.static no
project.ptx, you can add
<stringparam key="webwork.divisional.static" value="no"/>
You can also specify a WeBWorK server as a string parameter, using
@valueset to the server you use.
Finally, if there is any component for which you use additional XSL, you can specify this in the manifest as well. For example, if you have a LaTeX style sheet
xsl/latex-style.xsl, then in both the
<pdf>sections, you should add the line
See Section M.4 below for further details on using custom XSL.