yihui / knitr-talks

talks on the knitr package
15 stars 20 forks source link

Slidify your talk! #1

Open ramnathv opened 12 years ago

ramnathv commented 12 years ago

Thanks to both of you for the wonderful packages knitr and markdown. As you both know, I have been working on a package slidify that allows easy rendering of HTML5 presentations from R Markdown files.

As I was scouring github for sample presentations that I could use for slidify, I came across this repository. I took the liberty of running slidify on it, and you can see the resulting slide deck and the source files.

You can play around with different configurations by modifying the config.yml file. The deck is formatted to html5slides specifications, so I would recommend not changing it. You can change the highlighter to R and use any of the styles shipped with knitr, or keep highlighter as js and use any of the styles shipped with highlight.js.

framework: html5slides
highlighter: js
histyle: github
input: slides2.Rmd

Once you have modified the configuration file, you can run the following to generate the slide deck.

library(slidify)
source('slidify2.R')
slidify2('config.yml')

Good luck with the talk on June 5th. Let me know if you guys have any questions or feedback or suggestions for slidify.

yihui commented 12 years ago

sure, I'll definitely consider this! your version looks better than ours

thanks a lot!

ramnathv commented 12 years ago

Let me know if you need any help with customizing the presentation should you choose to go with slidify. On a related note, can I set opts_knit$(out.format = 'html') outside of my document. The reason I want to do this is to fool knitr into highlighting code using highlight. However, when I do this and run knit('slides.Rmd'), it is reset to markdown. Currently, my solution to this is to insert the lines in the document, but it would be nice if there is a way to do this from outside, so that users can use the same .Rmd document always.