Docker codespace + custom xsl

3 views
Skip to first unread message

D. Brian Walton

unread,
Feb 18, 2026, 3:50:55 PMFeb 18
to pretext-support
I've been working with the Docker image on two projects to deal with slides for two courses. I'd like to see what would happen if I change every <slide> to <subsection> to see what a simple HTML version that doesn't try to be a slide would work. (I don't use any of RevealJS features.)

It seems like a thin XSL that makes the substitution would be the cleanest nondestructive method. But I don't see how to add custom XSL files to a project. I tried to follow directions here https://pretextbook.org/doc/guide/html/cli-xsl.html but I couldn't get the python import statement to work — maybe the page is out of date? Or maybe using Docker requires a different approach?

Thanks,
Brian

Oscar Levin

unread,
Feb 18, 2026, 4:44:20 PMFeb 18
to pretext...@googlegroups.com
Hi Brian,

Unfortunately, that part of the guide is out of date (as are some other parts of the guide on this topic).

The easiest thing is probably for me to show you an example.  First, in project.ptx, you will want to do something like this: https://github.com/oscarlevin/discrete-book/blob/0e7e7e7a153fbaec463ce8b252dc35d48c646ff2/project.ptx#L10

In the xsl file you have, you can import the core xsl like this: https://github.com/oscarlevin/discrete-book/blob/0e7e7e7a153fbaec463ce8b252dc35d48c646ff2/xsl/dmoi-html.xsl#L22.  The ./core/pretext-html.xsl there does not need to live in your project directory; we copy your xsl into a temporary folder and copy the core xsl into the corresponding subfolder.

Oscar.

--
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 visit https://groups.google.com/d/msgid/pretext-support/CAH7VRo%2BE34HQoxOC2tqeBSW5p58ZtiNdXiJ%3DU_2bUR2%2BypMCyw%40mail.gmail.com.

D. Brian Walton

unread,
Feb 18, 2026, 4:56:26 PMFeb 18
to pretext...@googlegroups.com
Oscar,

Thank you. This points me in the right direction.

Brian

Reply all
Reply to author
Forward
0 new messages