Skip to main content

Section M.3 Updating docinfo, the publication file, and the project manifest

Open both your original publication.ptx file, and the one created by the pretext init command. The file created by pretext init will contain some directory management details, such as:

<source webwork-problems="../generated-assets/webwork/webwork-representations.xml">
    <directories external="../assets" generated="../generated-assets"/>

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 init with your own.

If your <docinfo> contains a <brandlogo>, you may need to change the @source attribute from logo.png to images/logo.png, where logo.png is the name of the file used for your brand logo. This assumes that the file you use for your brand logo is contained in PROJECT-CLI/assets/images/.

Next, we need to update the project.ptx file that was created by pretext init. Opening the file, you will see there are several components: html, latex, pdf, and subset. The subset component is quite useful for editing: specify an xml:id from your book (such as a chapter or section), and you can use the command pretext build subset to 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.ptx manifest. For example, if you have WeBWorK problems and use the static preview feature, your xsltproc executable would have contained

        --stringparam webwork.divisional.static no

In the <html> section of project.ptx, you can add

        <stringparam key="webwork.divisional.static" value="no"/>

You can also specify a WeBWorK server as a string parameter, using key="server" , with @value set 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 <latex> and <pdf> sections, you should add the line


See Section M.4 below for further details on using custom XSL.