Search code examples
rlatexr-markdownbeamer

Setting page duration in R Markdown presentations


I need to create an auto advancing presentation for a lightning talk. Is there a way to use the \hypersetup{pdfpageduration=n} functionality from Beamer within R Markdown without editing the intermediate .tex file? If possible, I would like to be able to set a different time for each slide. I'm open to solutions that use the html presentation engines (ioslides or Slidy) if this is an easier alternative.


Solution

  • You can set the duration on each slide separately by using \transduration{<seconds>}:

    ---
    output: 
      beamer_presentation:
        keep_tex: true
    ---
    
    # slide 1
    \transduration{0.5}
    
    
    # slide 2
    \transduration{0.1}