diff --git a/docs/presentations/revealjs/index.qmd b/docs/presentations/revealjs/index.qmd index 5bfb5e9fc8..682813de77 100644 --- a/docs/presentations/revealjs/index.qmd +++ b/docs/presentations/revealjs/index.qmd @@ -398,7 +398,52 @@ Content for `Tab B` ::: ``` -Note that one significant disadvantage to tabsets is that only the first tab will be visible when printing to PDF. +When you print to PDF, only the active tab of a tabset shows. +The active tab is the first tab, unless another tab has the `.active` class. +To print all the tabs, use tabset fragments. + +### Tabset fragments + +{{< prerelease-callout 1.12 >}} + +Set the `tabset-fragments` option to step through the tabs of each tabset as fragments: + +``` yaml +format: + revealjs: + tabset-fragments: true +``` + +Each step of the presentation shows the next tab. +The fragments in a tab show one by one before the next tab. +A `fragment-index` sets the order of the fragments in its own tab only. +The tabset always starts on the first tab, and the `.active` class has no effect. + +To change one tabset only, add a class to that tabset: + +- `.tabset-fragments` turns on the steps for the tabset, when the option is off. +- `.no-tabset-fragments` turns off the steps for the tabset, when the option is on. + +A tabset inside a tabset that does not step does not step either, whatever its class. + +``` markdown +::: {.panel-tabset .tabset-fragments} + +### Tab A + +Content for `Tab A` + +### Tab B + +Content for `Tab B` + +::: +``` + +When you print to PDF, each tab of a tabset with fragments shows on a page: + +- With `pdf-separate-fragments: true`, each step gets its own page, as for other fragments. +- With `pdf-separate-fragments: false`, each tab gets one page, and the slide numbers show as `2.1`, `2.2`, and so on. ## Slide Backgrounds