Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Problems using slideshow

41 views
Skip to first unread message

Stephen Flood

unread,
Jul 9, 2024, 8:41:30 PM7/9/24
to PreTeXt support
I was at the session on using PreTeXt in GitHub Codespaces on Monday, and it inspired me to try to make a slideshow in PreTeXt.  I have tried following both the guide ( https://pretextbook.org/doc/guide/html/topic-slides.html ) and the sample document it links ( https://github.com/PreTeXtBook/pretext/blob/dev/examples/sample-slideshow/sample-slideshow.xml ). 

Both a minimal example with just <pretext>, <slideshow>, and <slides> and the full sample document compile to HTML without errors, but the slides are not formatted correctly, and their titles all begin with [STRUCT].[NUM] .  I tried generating a PDF, but it has never succeeded.  Is  <slideshow> depreciated, or am I doing something wrong?

The GitHub for my test is at https://github.com/stephen-flood/slideshow-test , and it has the HTML as a GitHub Page.

The experience of using the Codespaces is incredibly smooth.  Thanks for everything that all of you are doing!

kcri...@gmail.com

unread,
Jul 10, 2024, 7:46:58 AM7/10/24
to PreTeXt support
I was at the session on using PreTeXt in GitHub Codespaces on Monday, and it inspired me to try to make a slideshow in PreTeXt.  I have tried following both the guide ( https://pretextbook.org/doc/guide/html/topic-slides.html ) and the sample document it links ( https://github.com/PreTeXtBook/pretext/blob/dev/examples/sample-slideshow/sample-slideshow.xml ). 

Both a minimal example with just <pretext>, <slideshow>, and <slides> and the full sample document compile to HTML without errors, but the slides are not formatted correctly, and their titles all begin with [STRUCT].[NUM] .  I tried generating a PDF, but it has never succeeded.  Is  <slideshow> depreciated, or am I doing something wrong?

As a data point, at least for me slides have been working in html pretty well for some time, though there are still one or two beta-like issues as you will see if you look at the Github issues and search for "slides".  Maybe there was a recent change?  I'm sure the cognoscenti will be able to fix whatever issue there is on that relatively easily, it's possibly related to the recent change where you need to run the pretext script to get CSS and some other stuff.

But as for Beamer, that is probably in worse shape.  Already two years ago (https://groups.google.com/g/pretext-dev/c/-hbTnwlOLyI/m/9JVC7kOBBAAJ) Rob said it "really needs attention", and the last commit is also from nearly two years ago.  I bet that any assistance you might be able to provide in debugging where the conversion fails would be greatly appreciated.

 

Oscar Levin

unread,
Jul 10, 2024, 11:00:39 AM7/10/24
to PreTeXt support
To process a slideshow you need to use a different xsl style sheet than the ones that create html or latex/pdf output.  In the CLI, this is still a little hacky.  You get get a sample setup by running `pretext new slideshow`.

I'm going to add an issue to the pretext-cli repo suggesting that we add better support and documentation for this. 

Stephen Flood

unread,
Jul 10, 2024, 11:47:44 AM7/10/24
to PreTeXt support
Thanks, this is really helpful.  I ran `pretext new slideshow` in the Codespace, and used it to update my slide-show test repository.  I looked at the diff's, and it seems like it should be possible to update the pretext-codespace repository with both configurations.  Just add a "slideshow" target in the project.ptx target, add xsl/slides.xsl, and add the <reveal.js> entries to publication.ptx.  Or does something go wrong when you add it to the regular publication.ptx

After the conversion, CodeChat now gives errors in two sub-windows.  I've copied the messages below.

------------ first window -------------------------
Error: 404 Not Found

Sorry, the requested URL 'https://studious-eureka.app.github.dev/client/2/workspaces/slideshow-test/output/web/main.ptx' caused an error:

File does not exist.
 
-------------- second window -----------------------
Build messages
Loading project file /workspaces/slideshow-test/codechat_config.yaml. /workspaces/slideshow-test > /usr/local/bin/python -m pretext build web --xmlid definition-indefinite-integral
Generated `/workspaces/slideshow-test/codechat_config.yaml` Generated `/workspaces/slideshow-test/.gitignore` Generated `/workspaces/slideshow-test/.devcontainer.json` Generated `/workspaces/slideshow-test/requirements.txt` Generated `/workspaces/slideshow-test/.github/workflows/deploy.yml` Generated `/workspaces/slideshow-test/.github/workflows/test-build.yml` PreTeXt-CLI version: 2.4.1 PreTeXt project found in `/workspaces/slideshow-test`. Building with custom xsl /workspaces/slideshow-test/xsl/slides.xsl Preparing to build into /workspaces/slideshow-test/output/web. XSL conversion of /workspaces/slideshow-test/source/main.ptx by /tmp/pretext_9vf1241w/slides.xsl messages from the log for XSL processing (indented): * ******************************************************************************** * Conversion to reveal.js presentations/slideshows is experimental * Requests for additional specific constructions welcome * Additional PreTeXt elements are subject to change * ******************************************************************************** * PTX:DEPRECATE: (2021-09-19) the Reveal.js publisher option for minified resources (revealjs/resources/@minified) is obsolete and is being ignored. Removing it will stop this message (1 time) * -------------- * PTX:DEPRECATE: (2022-04-25) a "@label" attribute (on a "ul" or "ol" element) has been deprecated and should be replaced by the functionally equivalent "@marker". We will attempt to honor your request (2 times) * located within: "Ordered Lists, With Features" (title) * located within: "Ordered Lists, With Features" (title) * -------------- successful application of /tmp/pretext_9vf1241w/slides.xsl Success! Run `pretext view` to see the results. /workspaces/slideshow-test/source/main.ptx:: ERROR: CodeChat renderer - unable to find the HTML output file /workspaces/slideshow-test/output/web/main.ptx

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


On Wednesday, July 10, 2024 at 11:00:39 AM UTC-4 Oscar Levin wrote:
To process a slideshow you need to use a different xsl style sheet than the ones that create html or latex/pdf output.  In the CLI, this is still a little hacky.  You get get a sample setup by running `pretext new slideshow`.

I'm going to add an issue to the pretext-cli repo suggesting that we add better support and documentation for this. 

Stephen Flood

unread,
Jul 10, 2024, 12:23:55 PM7/10/24
to PreTeXt support
I was able to combine the publication and project files from the pretex-codespaces and the default slideshow in https://github.com/stephen-flood/slideshow-test

It seems to build the slides correctly when the target for the slideshow is named "web".  But I'd really like to add a new build target "slideshow".  I tried just adding it to project.ptx, but it the Codespace didn't automatically add it to the menu of commands.  I tried looking in other files, but I am not familiar enough with Codespaces to make this work.

Oscar Levin

unread,
Jul 10, 2024, 12:50:04 PM7/10/24
to PreTeXt support
You can name the target whatever you like, so making it "slideshow" should work fine.  However, to get the vscode plugin to recognize it, you need to "Refresh Targets" from the pretext menu.

Stephen Flood

unread,
Jul 10, 2024, 2:12:08 PM7/10/24
to PreTeXt support
Great, that works perfectly!  Thanks for your help with this.

Rob Beezer

unread,
Jul 11, 2024, 10:12:50 AM7/11/24
to pretext...@googlegroups.com
And perhaps it is time to create a routine for PreTeXt (in pretext/pretext.py)
which does nore than just apply the stylesheet. Such as grabbing the necessary
Javascript and placing it in the right place as part of a build.

Rob

On 7/10/24 08:00, Oscar Levin wrote:
> To process a slideshow you need to use a different xsl style sheet than the ones
> that create html or latex/pdf output.  In the CLI, this is still a little
> hacky.  You get get a sample setup by running `pretext new slideshow`.
>
> I'm going to add an issue to the pretext-cli repo suggesting that we add better
> support and documentation for this.
>
> On Wednesday, July 10, 2024 at 5:46:58 AM UTC-6 kcri...@gmail.com wrote:
>
> I was at the session on using PreTeXt in GitHub Codespaces on Monday,
> and it inspired me to try to make a slideshow in PreTeXt.  I have tried
> following both the guide (
> https://pretextbook.org/doc/guide/html/topic-slides.html
> <https://pretextbook.org/doc/guide/html/topic-slides.html> ) and the
> sample document it links (
> https://github.com/PreTeXtBook/pretext/blob/dev/examples/sample-slideshow/sample-slideshow.xml <https://github.com/PreTeXtBook/pretext/blob/dev/examples/sample-slideshow/sample-slideshow.xml> ).
>
> Both a minimal example with just <pretext>, <slideshow>, and <slides>
> and the full sample document compile to HTML without errors, but the
> slides are not formatted correctly, and their titles all begin with
> [STRUCT].[NUM] .  I tried generating a PDF, but it has never succeeded.
> Is  <slideshow> depreciated, or am I doing something wrong?
>
>
> As a data point, at least for me slides have been working in html pretty
> well for some time, though there are still one or two beta-like issues as
> you will see if you look at the Github issues and search for "slides".
>  Maybe there was a recent change?  I'm sure the cognoscenti will be able to
> fix whatever issue there is on that relatively easily, it's possibly related
> to the recent change where you need to run the pretext script to get CSS and
> some other stuff.
>
> But as for Beamer, that is probably in worse shape.  Already two years ago
> (https://groups.google.com/g/pretext-dev/c/-hbTnwlOLyI/m/9JVC7kOBBAAJ
> <https://groups.google.com/g/pretext-dev/c/-hbTnwlOLyI/m/9JVC7kOBBAAJ>) Rob
> said it "really needs attention", and the last commit is also from nearly
> two years ago.  I bet that any assistance you might be able to provide in
> debugging where the conversion fails would be greatly appreciated.
>
> --
> 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
> <mailto:pretext-suppo...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pretext-support/3048b43a-d580-4e7d-9a38-282ad5219804n%40googlegroups.com <https://groups.google.com/d/msgid/pretext-support/3048b43a-d580-4e7d-9a38-282ad5219804n%40googlegroups.com?utm_medium=email&utm_source=footer>.

Oscar Levin

unread,
Jul 11, 2024, 11:39:07 AM7/11/24
to PreTeXt support
A few years ago I hacked together some xsl that extracted some elements from my book and put them into a pretext slideshow xml document, that I then processed using the slideshow xsl.  I'm sure that is quite stale, but I can try to look for it and we can investigate next week.

My memory is that all this is very difficult to get done in any generality.  The length of items you want in a book is going to be different than what can fit on a slide.  But maybe fresh perspectives would help us get past these issues.

Sean Fitzpatrick

unread,
Jul 11, 2024, 12:56:50 PM7/11/24
to pretext...@googlegroups.com

I've got a semester's worth of slides we can use for experimentation next week.

Mostly things worked ok, with some manual editing of the HTML needed for images, and some hacking for side-by-side. (Margins aren't implemented, for example. I did a 2 panel SBS as 3 panels, where the middle panel contained something like

<p><m>\phantom{abcdefg}</m></>

to force some space between panels.

I've never tried using codechat. But viewing the HTML file directly works well enough.


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/26f8fc94-73c1-4abd-92d7-7de52e4b4897n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages