我们如何为每张幻灯片(而不是每个片段)创建一个 PDF 页面?

How Do We Create One PDF Page Per Slide (Not Per Fragment)?

以前 reveal.js 会为每张幻灯片生成一个 PDF 页面。现在,从 this issue 开始,它会为每个片段生成一个 PDF 页面。不过,我想以每张幻灯片一页的旧格式生成 PDF。

This comment on that issue 表明有一个配置选项,但从项目文档中看不出是什么。

哪个配置选项控制这个?或者,是否有另一种方法可以让 reveal.js PDF 导出为每张幻灯片一页?

来自reveal.js' README.md, under PDF Export > Separate pages for fragments

Fragments are printed on separate slides by default. Meaning if you have a slide with three fragment steps, it will generate three separate slides where the fragments appear incrementally.

If you prefer printing all fragments in their visible states on the same slide you can set the pdfSeparateFragments config option to false.

所以,您似乎可以通过以下方式导出每页的多个片段:

Reveal.configure({ pdfSeparateFragments: false });