After doing html slides what’s next?
Beamer is a LaTeX class for creating slides for presentations.
But I know nothing about Beamer neither about LaTeX.
I wanted to convert the html presentations to Beamer, because the output of Beamer/LaTex is pdf, and pdfs shows nicely in figshare.
Ok, pandoc comes to rescue us, I already have the files I’ve done with Rstudio and knitr which I described in the previous post so it’s very easy, with pandoc you can generate html slides or Beamer slides:
but the result is not very good, the images were BIG, very BIG.
Thanks to Jeromy Anglim’s post about Beamer/Markdown I learn to use some simple LaTex formating commands for images:
The problem is that images dynamically generated with R, can’t be formated this way. Knitr chunk options have the posibility to change size:
The images get smaller but the fonts dont’ change it’s size, the images are awfull. The other chunk options to control output size:
out.heightdidn’t work with Beamer.
Thus I choose the option to modify the Markdown file generated by knitr with the previous LaTex command. It was not a very elegant solution but worked.
UPDATE: here there is a python script to replace <center>!(figure)</center> with LaTeX code
Then I ended with two files: the Rstudio markdown with all the R commands to generate the plots and a modified markdown file used for generate the beamer output by pandoc.
And I uploaded the presentation to figshare, but the presentation can be showed in your blog/web page using the google docs viewer
Copy the link from the download button on figshare article’s web page
Paste the link to google viewer, generate the link, include the resulting code in your web page and voila:
I like the slides generated by pandoc/Beamer, so I think that I am prepared to say goodbye to powerpoint/impress now.