Rpres HTML5 presentation "Save As PDF" (Google Chrome) displays incorrectly

10,145

Solution 1

At the moment, RStudio doesn't come with a print CSS for the Rpresentations. As per RStudio support reply here, they are looking to add the feature to save as PDF directly into RStudio. In the meantime, Pandoc is the way to go.

EDIT May 12, 2014:

PDF production of presentations has in the meantime been implemented in RStudio. You can get nice PDF in landscape format with controls to navigate between slides. Download preview version 0.98.836 or higher from here. Then click:

File -> New File -> R Markdown -> Presentation -> Default Output Format = PDF (Beamer)

enter image description here

Solution 2

You can use RStudio to open the corresponding .md file, of course you have to Preview your .Rpres before to generate the .md file. Then click the Preview button to view the .md file and open it in a browser. Finally, it can be printed as hand-outs.

Share:
10,145
Daniel Krizian
Author by

Daniel Krizian

Author of strategery package (GitHub link) Co-author of rChartsDygraphs package (GitHub link)

Updated on June 14, 2022

Comments

  • Daniel Krizian
    Daniel Krizian almost 2 years

    I am trying to save the Rpres HTML5 presentation (a new feature of Rstudio) as PDF document, which will serve as a presentation handout (as suggested here )

    The problem is that the output looks messed up in the pdf, even for the basic presentation example supplied with the RStudio.

    How to recreate the problem - copy this to new .Rpres file from within RStudio, or just open new File -> New File -> R Presentation:

    test
    ========================================================
    author: 
    date: 
    
    First Slide
    ========================================================
    
    For more details on authoring R presentations click the
    **Help** button on the toolbar.
    
    - Bullet 1
    - Bullet 2
    - Bullet 3
    
    Slide With Code
    ========================================================
    
    ```{r}
    summary(cars)
    ```
    
    Slide With Plot
    ========================================================
    
    ```{r, echo=FALSE}
    plot(cars)
    ```
    

    Within RStudio, click Preview -> View in Browser Within Google Chrome, right-click -> Print... will produce the following messy pdf