| Marc Kupietz | b066e74 | 2026-08-23 09:57:06 +0300 | [diff] [blame] | 1 | % Generated by roxygen2: do not edit by hand |
| 2 | % Please edit documentation in R/slide_timing.R |
| 3 | \name{slide_timing} |
| 4 | \alias{slide_timing} |
| 5 | \title{Compute per-speaker slide times from timing comments} |
| 6 | \usage{ |
| 7 | slide_timing(input, slide_level = 2) |
| 8 | } |
| 9 | \arguments{ |
| 10 | \item{input}{Path to an R Markdown file.} |
| 11 | |
| 12 | \item{slide_level}{Level of heading that denotes individual slides (should |
| 13 | match the \code{slide_level} used when rendering).} |
| 14 | } |
| 15 | \value{ |
| 16 | A list with three elements: \code{slides} (one row per slide and |
| 17 | speaker), \code{speakers} (total time per speaker), and \code{total} (grand total |
| 18 | in seconds). \code{slide_timing()} is called for its side effect of printing a |
| 19 | summary. |
| 20 | } |
| 21 | \description{ |
| 22 | Parses an R Markdown presentation for timing comments of the form |
| 23 | \verb{<!-- MK 00:30 -->} (speaker code followed by a duration in \code{MM:SS}, |
| 24 | \code{HH:MM:SS}, or plain seconds format) or, for single-speaker talks, simply |
| 25 | \verb{<!-- 00:30 -->}, and computes the time allocated to each slide, each |
| 26 | speaker, and the whole presentation. |
| 27 | } |
| 28 | \details{ |
| 29 | The same convention can be used directly in |
| 30 | \code{\link[=revealjs_presentation]{revealjs_presentation()}}: any such comment in the source document is |
| 31 | automatically converted into a \code{data-timing} attribute on the enclosing |
| 32 | slide's \verb{<section>} element, which activates the pacing timer in the |
| 33 | reveal.js speaker view. |
| 34 | } |
| 35 | \examples{ |
| 36 | \dontrun{ |
| 37 | slide_timing("talk.Rmd") |
| 38 | } |
| 39 | |
| 40 | } |