Open cderv opened 3 years ago
Thoughts about defaults:
toc = FALSE
like in html_document()
. Adding a TOC slide should be only when user decides
toc_depth = 1
could be a good default to only show on TOC slide the main headers. But that supposes h1 are used #
for slides (slide_level = 2
). So maybe toc_depth
should default to slide-level
- 1, and to 1 if slide_level = 0
is used 🤔
Do we want to add a default toc-title
value like "Outline" ? Or should it be user provided only ? Also, should we add it as argument in the function ?
It could always be set using toc-title
in YAML header but toc
and toc_depth
are argument in html_document()
already. Not toc_title
toc_depth = slide_level - 1
does not work if slides only contains the slide level header (like the skeleton only using ##
). pandoc default is 3 but it is not ideal.
I'll take more time to think about this and just add the variables for now.
toc-title
as an argument of the output format function
Currently we have the
toc
variable in the template https://github.com/rstudio/revealjs/blob/c4d57b90e56ea8f2097d112db7308ade0acc3bbb/inst/rmarkdown/templates/revealjs_presentation/resources/default.html#L518-L522It can be activated using
We need to add the
toc: true
argument to the function. But it is quite scarce for now as it will just add a slide with TOC content.Pandoc's current template is better and offer to customize the
toc-title
that we are missing https://github.com/jgm/pandoc/blob/d133d737ae4a9f37d0eb6361b3b367157d3dc3bf/data/templates/default.revealjs#L63-L72toc-title
is supported in template since 2.14 only: https://github.com/jgm/pandoc/commit/96d384ac9e4458d6067a85a9347bf9d79d131f2d (https://github.com/jgm/pandoc/pull/7171)So we need to at least update that to the template.
And with this maybe #69 is not needed.