ids theme: automatic chapter numbering, ported from gdoc2reveal
Chapter headings (#) are numbered automatically when the presentation is
opened: "1. Introduction", "2. Methods", and so on. References, appendix
and thank-you chapters keep their bare titles and are not counted.
Manually typed leading numbers ("# 2. Methods") are stripped before
renumbering, so decks migrated from the old Google Docs pipeline and
repeated numbering runs stay stable.
The menu plugin and the transcript view show the numbers, too; the
Overview slide's table of contents prepends them as orange
.ids-toc-number spans flush with the slide heading, with the theme's
drawn list markers suppressed for the top-level entries (sub-headings
keep their bullets). Decks rendered with slide_level: 1 are left
unnumbered -- there, headings denote slides, not chapters.
Bump version to 0.9.1.9010.
Change-Id: I233086e039aee0da156cfaaebe04d05f3ad851ce
diff --git a/R/revealjs_presentation.R b/R/revealjs_presentation.R
index 05c8131..047bda3 100644
--- a/R/revealjs_presentation.R
+++ b/R/revealjs_presentation.R
@@ -94,17 +94,36 @@
#' The function [slide_timing()] computes these totals directly from an
#' `.Rmd` source file without rendering it.
#'
+#' ## Chapter numbering
+#'
+#' Like in the old Google Docs slide workflow, chapter headings (`#`) are
+#' numbered automatically: the first chapter becomes "1. Introduction", the
+#' second "2. Methods", and so on. References, appendix and thank-you
+#' chapters (References/Literatur/Referenzen/Publikationen/
+#' Herausgeberschaften/Appendix/Anhang, and headings containing
+#' "Thank you"/"Vielen Dank") keep their bare titles and are not counted.
+#' Manually typed leading numbers (`# 2. Methods`) are stripped before
+#' renumbering, so decks migrated from the old pipeline and repeated
+#' numbering runs stay stable. The numbers are added when the presentation
+#' is opened: the menu plugin and the transcript view show them, too, and
+#' the overview slide's table of contents uses them as its ordered list's
+#' enumeration. Decks rendered with `slide_level = 1` (one `#` heading per
+#' slide) are left unnumbered -- there, headings denote slides, not
+#' chapters.
+#'
#' ## Overview slides
#'
#' Like in the original Google Docs slide workflow, a slide titled
#' "Overview" or "Überblick" is automatically turned into a table of
#' contents: its body content is replaced at presentation time with a
-#' clickable list of all `#` chapter headings. Adding
+#' clickable, ordered list of all `#` chapter headings, whose enumeration
+#' repeats the chapter numbers. Adding
#' `{data-overview-subheadings=true}` to the heading also includes the
#' `##` sub-headings below their chapters, laid out in two columns.
-#' References and appendix chapters (References/Literatur/
-#' Literaturverzeichnis/Appendix/Anhang) are left out, together with
-#' their sub-slides.
+#' References, appendix and thank-you chapters (References/Literatur/
+#' Literaturverzeichnis/Referenzen/Publikationen/Herausgeberschaften/
+#' Appendix/Anhang, and headings containing "Thank you"/"Vielen Dank") are
+#' left out, together with their sub-slides.
#'
#' ### Search
#'