xsltDocumentElem: unable to save to ./knowl/p-1682.html

6 views
Skip to first unread message

Petra Bonfert-Taylor

unread,
Sep 16, 2022, 2:57:39 PM9/16/22
to PreTeXt support
Hi-

After upgrading my CLI (from 0.6 to the current version) I can no longer create latex output. For some reason, rather than working in the temporary directory, tons of html (why html when trying to create LaTeX?) files are created in my main directory.

In addition, I get the below error message along with hundreds of : 

    * No such file or directory

    * No such file or directory

    * runtime error, element 'document'

    * xsltDocumentElem: unable to save to ./knowl/p-1682.html

Final error message:

critical: xsltDocumentElem: unable to save to ./knowl/p-1682.html

##################

Failed to build latex.  Exiting...

----------------------------------------------------

While running pretext, the following errors occured:

critical: xsltDocumentElem: unable to save to ./knowl/p-1682.html


Thanks- Petra

Oscar Levin

unread,
Sep 16, 2022, 2:59:58 PM9/16/22
to pretext...@googlegroups.com
Can you please post the output of pretext support?  

--
You received this message because you are subscribed to the Google Groups "PreTeXt support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pretext-suppo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pretext-support/8cab8a57-8369-4560-a6a6-83b799dddfdcn%40googlegroups.com.

Petra Bonfert-Taylor

unread,
Sep 16, 2022, 3:56:05 PM9/16/22
to PreTeXt support
Thanks, Oscar! Here it is:

PreTeXt project found in `/Users/dz00762/Documents/PreTeXt Projects/C-Programming`.


Please share the following information when posting to the

pretext-support Google Group.


PreTeXt-CLI version: 1.0.3

    PyPI link: https://pypi.org/project/pretextbook/1.0.3/

PreTeXt core resources commit: 9458d8fb9bed7cec88e48bc648245d07a5948600

Runestone Services version: 6.3.7

OS: macOS-12.5.1-arm64-arm-64bit

Python version: 3.9.12

Current working directory: /Users/dz00762/Documents/PreTeXt Projects/C-Programming

PreTeXt project path: /Users/dz00762/Documents/PreTeXt Projects/C-Programming


Contents of project.ptx:

------------------------

<!--

    This file provides the overall configuration for your PreTeXt

    project. To edit the content of your document, open `source/main.ptx`

    (default location).

--><project>

  <targets>

    <target name="web">

      <format>html</format>

      <source>source/main.ptx</source>

      <publication>publication/publication.ptx</publication>

      <output-dir>output/html</output-dir>

<!--      <output-dir>../ENGS20/c-programming/</output-dir> -->

<!--      <stringparam key="html.css.extra" value="external/custom-styles.css"/> -->

      <xsl>xsl/c-programming-html.xsl</xsl>

    </target>

    <target name="latex">

      <format>latex</format>

      <source>source/main.ptx</source>

      <publication>publication/publication.ptx</publication>

      <output-dir>output/latex</output-dir>

      <stringparam key="debug.skip-knowls" value="yes"/>

      <xsl>xsl/c-programming-latex.xsl</xsl>

    </target>

    <target name="pdf" pdf-method="pdflatex">

      <format>pdf</format>

      <source>source/main.ptx</source>

      <publication>publication/publication.ptx</publication>

      <output-dir>output/pdf</output-dir>

      <xsl>xsl/c-programming-latex.xsl</xsl>

    </target>

    <target name="subset">

      <format>html</format>

      <source>source/main.ptx</source>

      <publication>publication/publication.ptx</publication>

      <output-dir>output/subset</output-dir>

      <stringparam key="debug.skip-knowls" value="yes"/>

      <!-- edit this to change the section/chapter/etc. to include

           in your subset build -->

      <xmlid-root>ch-first</xmlid-root>

    </target>

  </targets>

  <executables>

      <latex>latex</latex>

      <pdflatex>pdflatex</pdflatex>

      <xelatex>xelatex</xelatex>

      <pdfsvg>pdf2svg</pdfsvg>

      <asy>asy</asy>

      <sage>sage</sage>

      <pdfpng>convert</pdfpng>

      <pdfeps>pdftops</pdfeps>

      <pdfcrop>pdf-crop-margins</pdfcrop>

      <pageres>pageres</pageres>

      <node>node</node>

      <liblouis>file2brl</liblouis>

    </executables>

</project>

------------------------

warning: Unable to locate the command for <pdfsvg> on your system.

warning: Unable to locate the command for <sage> on your system.

warning: Unable to locate the command for <pdfpng> on your system.

warning: Unable to locate the command for <pdfeps> on your system.

warning: Unable to locate the command for <pageres> on your system.

warning: Unable to locate the command for <node> on your system.

warning: Unable to locate the command for <liblouis> on your system.


Oscar Levin

unread,
Sep 16, 2022, 4:25:05 PM9/16/22
to PreTeXt support
My only guess at this point is that the stringparam "<stringparam key="debug.skip-knowls" value="yes"/>" looks out of place.  I don't know what that would do on a latex build, but it's worth trying without it.  

If that doesn't work, then we would need to see your custom xsl I think.  Or try without the custom xsl and see if that helps.

Petra Bonfert-Taylor

unread,
Sep 16, 2022, 4:45:31 PM9/16/22
to PreTeXt support
Found it... My 
<xsl:import href="./core/pretext-latex.xsl"/>
imported html instead of latex... That explains the creating of that insane number of html files while trying to create latex output. 

I am up and running now - thank you so much!

--Petra

Reply all
Reply to author
Forward
0 new messages