blob: 96cdcbfaeafa785939ea83b29cf9247982cae1ab [file] [log] [blame]
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/slide_timing.R
\name{slide_timing}
\alias{slide_timing}
\title{Compute per-speaker slide times from timing comments}
\usage{
slide_timing(input, slide_level = 2)
}
\arguments{
\item{input}{Path to an R Markdown file.}
\item{slide_level}{Level of heading that denotes individual slides (should
match the \code{slide_level} used when rendering).}
}
\value{
A list with three elements: \code{slides} (one row per slide and
speaker), \code{speakers} (total time per speaker), and \code{total} (grand total
in seconds). \code{slide_timing()} is called for its side effect of printing a
summary.
}
\description{
Parses an R Markdown presentation for timing comments of the form
\verb{<!-- MK 00:30 -->} (speaker code followed by a duration in \code{MM:SS},
\code{HH:MM:SS}, or plain seconds format) or, for single-speaker talks, simply
\verb{<!-- 00:30 -->}, and computes the time allocated to each slide, each
speaker, and the whole presentation.
}
\details{
The same convention can be used directly in
\code{\link[=revealjs_presentation]{revealjs_presentation()}}: any such comment in the source document is
automatically converted into a \code{data-timing} attribute on the enclosing
slide's \verb{<section>} element, which activates the pacing timer in the
reveal.js speaker view.
}
\examples{
\dontrun{
slide_timing("talk.Rmd")
}
}