PDF slides

27 views
Skip to first unread message

Oscar Levin

unread,
May 29, 2025, 11:05:30 PM5/29/25
to PreTeXt development
At a PreTeXt workshop I hosted today, I got asked about slides.  This was from a mathematician that teaches upper level courses and creates Beamer slides.  His argument against revealjs is that he likes to use a smartboard or tablet to write on the slides.  When you click to the next slide, the writing is saved to that particular slide, for returning to or posting online (let's ignore that sharing written-on slides is definitely not accessible).

Questions:
  1. Is this a good argument from tidying up the `pretext-beamer.xsl` and adding it as a target in the pretext/pretext script?
  2. Is this a good argument for investing more effort in the revealjs output, in particular fixing the page sizing so it could use reveal's print-pdf functionality (which admittedly is a few steps: https://revealjs.com/pdf-export/)?
  3. Is the answer to both questions above the same?
And assuming that at least one of the above questions is answered affirmatively,

4. I want the CLI to simplify the options people need to use, and say that there are two formats for slides: html and pdf.  If a user asks to build a pretext document as html, and the root element is `<slideshow>`, then they get revealjs; pdf will create beamer, for example.  The question is, should this feature be put into just the CLI or into `pretext/pretext.py`?

Oscar. 

Rob Beezer

unread,
May 30, 2025, 12:48:19 PM5/30/25
to prete...@googlegroups.com
Short answer is that the LaTeX preamble was so monolithic that adapting the
LaTeX conversion to Beamer was a mess. And so was not really being maintained.

But now that *somebody* has already made an alternate LaTeX conversion and
cleaned up the preamble...

I routinely make PDFs of PreTeXt Reveal slideshows using "decktape", mostly so I
have an archival copy of talks. That's the easy workaround.

Paragraph
https://pretextbook.org/doc/guide/html/publisher-revealjs.html#publisher-revealjs-10

I think there is value in a conversion to Beamer, along with a conversion to
Reveal. I personally prefer the latter when presenting, but image sizing drives
me nuts (I have not tried too hard to get that under control).

The challenge for both is the idea of a page/slide as a fundamental unit and how
authors get the right amount of material into that bucket. But that's not just
PreTeXt.

The simple interface to pretext/pretext.py has a format whose help entry says:

"revealjs - PreTeXt slideshow to reveal.js HTML format"

I'd imagine something similar for a "beamer" format. (There would be two
routines in the module.)

I don't think that prevents the CLI from doing soething different.

But consider: I also imagine converting a #slideshow to "regular" LaTeX so you
could make handouts of your slides (or notes while you present?). So I think
there could be two very different PDFs produced from a #slideshow.

Rob


On 5/29/25 20:05, Oscar Levin wrote:
> At a PreTeXt workshop I hosted today, I got asked about slides.  This was from a
> mathematician that teaches upper level courses and creates Beamer slides.  His
> argument against revealjs is that he likes to use a smartboard or tablet to
> write on the slides.  When you click to the next slide, the writing is saved to
> that particular slide, for returning to or posting online (let's ignore that
> sharing written-on slides is definitely not accessible).
>
> Questions:
>
> 1. Is this a good argument from tidying up the `pretext-beamer.xsl` and adding
> it as a target in the pretext/pretext script?
> 2. Is this a good argument for investing more effort in the revealjs output, in
> particular fixing the page sizing so it could use reveal's print-pdf
> functionality (which admittedly is a few steps: https://revealjs.com/pdf-
> export/)?
> 3. Is the answer to both questions above the same?
>
> And assuming that at least one of the above questions is answered affirmatively,
>
> 4. I want the CLI to simplify the options people need to use, and say that there
> are two formats for slides: html and pdf.  If a user asks to build a pretext
> document as html, and the root element is `<slideshow>`, then they get revealjs;
> pdf will create beamer, for example.  The question is, should this feature be
> put into just the CLI or into `pretext/pretext.py`?
>
> Oscar.
>
> --
> You received this message because you are subscribed to the Google Groups
> "PreTeXt development" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to pretext-dev...@googlegroups.com <mailto:pretext-
> dev+uns...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/
> fb431f7e-b80e-469c-8fbe-db13c439f0abn%40googlegroups.com <https://
> groups.google.com/d/msgid/pretext-dev/fb431f7e-b80e-469c-8fbe-
> db13c439f0abn%40googlegroups.com?utm_medium=email&utm_source=footer>.

Mitch Keller

unread,
May 30, 2025, 4:26:03 PM5/30/25
to prete...@googlegroups.com
I used decktape all spring to make PDFs to write on with my tablet during class. 

I think investing effort in making the reveal.js conversion more robust is better than dumping effort into a beamer conversion. With reveal.js and PreTeXt versions, one can have a blank version of slides to annotate during class and the annotated version to post as HTML after class. 

Perhaps the CLI could provide some helpful means of abstracting away the use of decktape, which isn’t awful to use but also isn’t super user-friendly the first six or eight times you try to use it. The main thing I ran into was having overfilled slides and not discovering it until I was scanning through the PDFs after I thought I was done preparing them.

To unsubscribe from this group and stop receiving emails from it, send an email to pretext-dev...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/MTAwMDAzMS5iZWV6ZXI.1748623696%40pnsh.


Sean Fitzpatrick

unread,
Jun 1, 2025, 10:03:24 AM6/1/25
to prete...@googlegroups.com

The last time I used the Beamer conversion was 2020, because some students wanted to be able to print the slides.
Then there was some minor disruption to teaching workflows for a few years.

If I recall correctly, Andrew R had been working on Beamer but abandoned it when he discovered decktape.

I like Mitch's idea of using versions.
I think Beamer used to allow printing several slides to a page for the paper-conscious. Can we do that with decktape?


Oscar Levin

unread,
Jun 1, 2025, 11:23:47 AM6/1/25
to PreTeXt development
I routinely make PDFs of PreTeXt Reveal slideshows using "decktape", mostly so I
have an archival copy of talks. That's the easy workaround.

Paragraph
https://pretextbook.org/doc/guide/html/publisher-revealjs.html#publisher-revealjs-10

I have not tried decktape, but that looks promising.  I don't know how automated we could get that, and I think some people might prefer the beamer look anyway.  
 
The simple interface to pretext/pretext.py has a format whose help entry says:

"revealjs - PreTeXt slideshow to reveal.js HTML format"

I'd imagine something similar for a "beamer" format. (There would be two
routines in the module.)

I am agnostic when it comes to whether there should be a `beamer` (and maybe also `beamer-tex`) target in the pretext/pretext script.  Even if there is, we have a choice as to how pretext.py implements it.  I think that creating two new functions is overkill.  Add a flag in both `latex` and `pdf` (maybe `slides`, or `beamer`, or `is_slides` etc) that just changes the xsl template.  The rest should be the same I think.  

And by the way, this is likely a good time to add a "save-source" option to the `pdf` function that copies over the .tex file and asset folders.  I suspect that being able to see the latex source will be very useful at first when building beamer.

On the other hand, there might be some specific options we would want to pass to the pdf-beamer function if it existed.  Create handouts too?  If we think these might become a thing that would be specified outside the publication file, then it might make sense to have a mostly duplicated version of `pdf`.
 
But consider: I also imagine converting a #slideshow to "regular" LaTeX so you
could make handouts of your slides (or notes while you present?). So I think
there could be two very different PDFs produced from a #slideshow.

This is a good point.  Converting a `<slideshow>` to a non-slideshow, or visa versa is possible, so I now agree that it makes sense to have separate formats for slides rather than just building from source. 

Rob Beezer

unread,
Jun 1, 2025, 12:33:10 PM6/1/25
to prete...@googlegroups.com
On 6/1/25 08:23, Oscar Levin wrote:
> I have not tried decktape, but that looks promising.  I don't know how automated
> we could get that, and I think some people might prefer the beamer look anyway.

Agreed. decktape requires node, so at least that infrstructure will be
familiar. Getting the size/resolution right always seems to be the trick - I
have settled on first trying 1920 x 1080.

> I am agnostic when it comes to whether there should be a `beamer` (and maybe
> also `beamer-tex`) target in the pretext/pretext script.  Even if there is, we
> have a choice as to how pretext.py implements it.  I think that creating two new
> functions is overkill.  Add a flag in both `latex` and `pdf` (maybe `slides`, or
> `beamer`, or `is_slides` etc) that just changes the xsl template.  The rest
> should be the same I think.

Understood. Wasn't sure exactly what you were thinking before. We can always
split out some common functionality into an internal/private routine. Going the
other way, we an also parameterize stylesheets and set those in the Python to
influence behavior.

> And by the way, this is likely a good time to add a "save-source" option to the
> `pdf` function that copies over the .tex file and asset folders.  I suspect that
> being able to see the latex source will be very useful at first when building
> beamer.

We do have the "latex" option, but that is just the *.tex file, not all the
images, etc. The other day, I went looking for the expanded save-source -like
option, which I thought we had. ;-) "save-source-zip" might be another good
option for folks who want to preserve their *entire* source in one archival
bundle. You know, for a research article, maybe.

> This is a good point.  Converting a `<slideshow>` to a non-slideshow, or visa
> versa is possible, so I now agree that it makes sense to have separate formats
> for slides rather than just building from source.
Keep me posted on what you think will work best. I'd just like the
pretext/pretext script to allow very discrete directed focused options for
testing and development.

Rob

Mitch Keller

unread,
Jun 2, 2025, 9:31:38 AM6/2/25
to prete...@googlegroups.com
On Jun 1, 2025, at 9:03 AM, Sean Fitzpatrick <dsfitz...@gmail.com> wrote:

I think Beamer used to allow printing several slides to a page for the paper-conscious. Can we do that with decktape?

I just used 2-up printing when I printed the PDF. One could also print the PDF to another PDF that does multiple slides per page. (May be an option with decktape, too, but since there are other easy options, I didn’t look into that.)


Reply all
Reply to author
Forward
0 new messages