Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 46 additions & 1 deletion docs/presentations/revealjs/index.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Loading