Table of contents and series
Every deck has a table of contents, with nothing to write: it is computed from the slides. Write a little more and it becomes the tree you want. On a site, decks of one sidebar category become a series, and a slide can link to a slide of another deck.
Computed, never required
Without any option:
- a label is the first heading of a slide (
#,##); a slide without a heading has no entry and falls under the one before it; - a section starts at every
layout=slide, and the slides after it fall under it until the next section;section - a deck without a section slide is a flat list of its slides.
M, or the Contents button of the toolbar, opens the drawer: the tree of sections and slides,
each section folded or open with the slides it covers (5–12), the current slide marked. The arrows
walk the tree, Enter goes to the slide, Escape closes. On a phone, the drawer is a sheet rising from
the bottom. The presenter console has the same button.
Short labels and sections
The options of a slide are the ones of a page of docs:
slides.md
| Option | Effect |
|---|---|
sidebar_ | the slide's label in the contents, the overview and the crumbs, instead of its title |
sidebar= | no entry for the slide; it falls under the entry before it |
section | a section starts at this slide, named by the text, without a layout= slide |
In the JSON twin they are typed fields of the scene: "sidebar":,
"sidebar": and "section":. A slide has no
order: the deck's order is its order.
Depth, numbers, or none
slides.md
toc: false removes the Contents drawer, its button and its key, and leaves the sections of the
progress bar. deck.toc in recit. sets it for every deck; a deck's toc: wins.
controls. removes the drawer as well as the overview.
The contents in a slide
:::toc writes the table of contents into a slide, as links to the slides (an agenda):
slides.md
In an MDX deck, <Toc /> and <Toc depth= write the same list.
A series of decks
On a site, the decks of one category of the sidebar are a series, in the sidebar's order:
recit.config.ts
- the foot of the Contents drawer names the series, says « Part 2 of 3 » and links to the decks before and after this one;
- after the last slide, a card leads to the next deck;
- on the page of a deck, the sidebar lists its sections, each a link to its first slide.
A category with one deck is no series, and a deck alone (recit build) has none.
controls., in the deck's controls: or in deck., hides the foot and the
card.
Grouping decks by theme
While a series orders decks meant to be read one after another, publish. and group on
publish. arrange published decks by theme in the sidebar and in <StoryGallery /:
recit.config.ts
- In the sidebar of a deck's page: decks without a
groupcome first at the top level, followed by one collapsible section per group (open by default, with its localizedlabeland itsicon, decks in entry order), above the sections of the current deck. Without anygroup, the sidebar only lists the current deck's sections as before. - In
<StoryGallery /: stories without a> groupappear first, then each non-empty group gets a heading (<h2>by default, orheadingLevelfrom2to6, e.g.headingLevel=) above its grid.{3} <StoryGallery groups=keeps a single flat grid.{false} / > - Order and undeclared groups: empty groups are omitted; the others sort by explicit
order, then declaration order inpublish., then first appearance ingroups publish.. Aentries groupcited inentrieswithout a matchingpublish.declaration uses itsgroups idas its label; declaring the sameidtwice inpublish.is a config error.groups - Groups and series together: a deck can carry a
groupand also belong to anavigationcategory; the category orders the « Next deck » card and the Contents drawer footer, whilegrouporganizes the sidebar and<StoryGallery /.>
Links to a slide
A deck opens on a slide with ?slide=4, #slide-4, or #<id>, the id of a scene:
slides.md
/stories/ opens that slide. In the source of a deck, link to another deck by its file:
Markdown
The compiler writes the address of the page: on a site, the page of that story
(/stories/); with recit build, a link to the deck's own file becomes #intro. A file
the site does not publish, or an id none of its scenes has, is an error with the file and the line
of the slide.
In the PDF
The bookmarks of a deck's PDF are its headings: a section named by section= gets one too, under
its own name. The bookmarks follow the order of the contents but not its nesting: every slide uses
#, so sections and slides are on one level.
Limits
- In an MDX deck, a link to another deck's file is not rewritten: write the page's address.
- On a site, the sections of a deck are listed after the other pages of its category, not under the deck itself.
- The PDF's bookmarks are on one level.