From 62f6169b892c4dba6bb50f15e4984866fcadeb47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20Canouil?= <8896044+mcanouil@users.noreply.github.com> Date: Tue, 10 Nov 2026 12:22:04 +0100 Subject: [PATCH 1/3] docs(revealjs): document tabset fragments --- docs/presentations/revealjs/index.qmd | 44 ++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/docs/presentations/revealjs/index.qmd b/docs/presentations/revealjs/index.qmd index 5bfb5e9fc8..06ea353647 100644 --- a/docs/presentations/revealjs/index.qmd +++ b/docs/presentations/revealjs/index.qmd @@ -398,7 +398,49 @@ 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.11 >}} + +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. +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. + +``` 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 From 7b8e048ed770af7d1cdca97498de3fc9c6f1f193 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20Canouil?= <8896044+mcanouil@users.noreply.github.com> Date: Tue, 10 Nov 2026 14:58:27 +0100 Subject: [PATCH 2/3] docs(revealjs): target 1.12 and explain fragment-index in tabs --- docs/presentations/revealjs/index.qmd | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/presentations/revealjs/index.qmd b/docs/presentations/revealjs/index.qmd index 06ea353647..d22185e96c 100644 --- a/docs/presentations/revealjs/index.qmd +++ b/docs/presentations/revealjs/index.qmd @@ -404,7 +404,7 @@ To print all the tabs, use tabset fragments. ### Tabset fragments -{{< prerelease-callout 1.11 >}} +{{< prerelease-callout 1.12 >}} Set the `tabset-fragments` option to step through the tabs of each tabset as fragments: @@ -416,6 +416,7 @@ format: 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: From 8acd42fd94649fe0482a971023361abbd570d8c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20Canouil?= <8896044+mcanouil@users.noreply.github.com> Date: Tue, 10 Nov 2026 16:07:55 +0100 Subject: [PATCH 3/3] docs(revealjs): state the nesting rule for tabset fragments --- docs/presentations/revealjs/index.qmd | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/presentations/revealjs/index.qmd b/docs/presentations/revealjs/index.qmd index d22185e96c..682813de77 100644 --- a/docs/presentations/revealjs/index.qmd +++ b/docs/presentations/revealjs/index.qmd @@ -424,6 +424,8 @@ 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}