Making Slides Without Powerpoint/impress Reloaded

- - posted in markdown, pandoc, slides | Comments


After doing html slides what’s next?

Beamer

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:

1
pandoc -t beamer RAE2012_DivPatron_charla.md -V theme:Warsaw -o RAE2012_DivPatron_charla.pdf


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:

1
\centerline{\includegraphics[height=2in]{my_image.pdf}}


The problem is that images dynamically generated with R, can’t be formated this way. Knitr chunk options have the posibility to change size: fig.width and fig.height.
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.width and out.height didn’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

https://docs.google.com/viewer

Updated: 
Copy the link from the download button on figshare article’s web page

http://files.figshare.com/101487/RAE2012_DivPatron_charla.pdf


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.



Comments