Building solutions manual

15 views
Skip to first unread message

J David Eisenberg

unread,
Mar 27, 2023, 10:05:11 PM3/27/23
to PreTeXt support
I have the following in my project.ptx:

    <target name="solutions">
      <format>custom</format>
      <source>pretext/cs20-thinkcspy.ptx</source>
      <publication>publication/solution_to_print.xml</publication>
      <xsl>xsl/solution-manual.xsl</xsl>
      <output-dir>output/solutions</output-dir>
    </target>

The solution_to_print.xml file is as follows:

<?xml version="1.0" encoding="UTF-8" ?>
<publication>
   <!-- directories are relative to the main source PreTeXt file -->
    <source>
        <directories external="../assets" generated="../generated-assets"/>
    </source>
</publication>

(same directories specification as the successful html/web build)

When I try pretext build solutions, I get this:

Building with custom xsl /home/david/comsc020/cs20-thinkcspy/xsl/solution-manual.xsl sp
ecified in project.ptx
Preparing to build into /home/david/comsc020/cs20-thinkcspy/output/solutions.

Now building with custom /tmp/tmpagp2xldr/solution-manual.xsl into /home/david/comsc020
/cs20-thinkcspy/output/solutions

XSL conversion of /home/david/comsc020/cs20-thinkcspy/pretext/cs20-thinkcspy.ptx by /tm
p/tmpagp2xldr/solution-manual.xsl
comprehensive messages, warnings, and errors:
   * failed to load external entity "/home/david/comsc020/cs20-thinkcspy/pretext/image
s/datafile/weather_file0.xml"
   * failed to load external entity "/home/david/comsc020/cs20-thinkcspy/pretext/image
s/datafile/weather_file1.xml"
   * failed to load external entity "/home/david/comsc020/cs20-thinkcspy/pretext/image
s/datafile/weather_file2.xml"
   * failed to load external entity "/home/david/comsc020/cs20-thinkcspy/pretext/image
s/datafile/weather_file3.xml"
   * failed to load external entity "/home/david/comsc020/cs20-thinkcspy/pretext/image
s/datafile/weather_file4.xml"
   * failed to load external entity "/home/david/comsc020/cs20-thinkcspy/pretext/image
s/datafile/bad_data_file.xml"
   * PTX:DEPRECATE: (2022-10-24) the  latex.pageref string parameter has been replaced
by the  latex/@pageref  entry in the publication file.  We will attempt to honor your
intent.

I don’t get the “failed to load external entity“ errors when building for web.

J David Eisenberg

unread,
Mar 27, 2023, 10:08:27 PM3/27/23
to PreTeXt support
P.S. This is the solution-manual.xml file:

<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:import href="./core/pretext-solution-manual-latex.xsl"/>
</xsl:stylesheet>

Oscar Levin

unread,
Mar 28, 2023, 1:03:14 AM3/28/23
to PreTeXt support
Here are a few things you can try:

1. Do a `pretext generate datafile -t print-latex`.  Then try again.
2. Switch the format to `latex` instead of `custom`.  (I don't remember if we ran into this issue with generating assets for a custom build before).

If those don't work, I'll think some more.

J David Eisenberg

unread,
Mar 28, 2023, 10:42:14 AM3/28/23
to PreTeXt support
The second option worked; thanks.
Reply all
Reply to author
Forward
0 new messages