The objective of slidify
is to make it easy to create reproducible HTML5 presentations from .Rmd
files.
The guiding philosophy of slidify
is to completely separate writing of content from its rendering, so that content can be written once in R Markdown
, and rendered as an HTML5
presentation using any of the HTML5
slide frameworks supported.
This package is not available on CRAN
as yet. A development version can be installed from github
using the devtools
package.
library(devtools)
install_github('slidify', 'ramnathv')
In addition to slidify
, you would also need to install development versions of knitr
, whisker
and markdown
.
install_github('knitr', 'yihui')
install_github('whisker', 'edwindj')
install_github('markdown', 'rstudio')
slidify
is designed to make it very easy for a HTML novice to generate a crisp, visually appealing HTML5
slide deck. You can do it in just three steps!
..ul: build
---
slidify("slides.Rmd")
to generate your slide deck.slidify
allows you to render your slides using several HTML5 slide frameworks. Currently supported frameworks are:
Extending slidify
to accommodate other frameworks is pretty straightforward. The plan is to support more frameworks over time.
The theme
option lets you style your slides. Currently, this option is available only for deck.js
which allows the following themes
Themes are just css
files. So it is easy to extend this option to the other frameworks if you can write css.
The transition
option allows you to define the transition between slides. Currently, this option is available only for deck.js
which allows the following transitions
Please consult deck.js documentation for more information on themes
and transitions
slidify
is designed to be modular and syntax highlighting is one module. Currently two options are supported
js
R
The js
option does client side highlighting using the javascript library highlight.js, while the R
option generates a static page, highlighted using the R package highlight.
You will notice that the quality of highlighting for R
code is better when done with the R
package, rather than highlight.js
.
slidify
allows you complete control over how you want to style your source code using css
. The styles currently supported depend on the highlighter
chosen.
js
see documentation for highlight.jsR
type knit_theme[['get']]()
to see available stylesIn order to use the R
option, you need to include the line opts_knit$set(out.format = 'html')
inside your .Rmd
file. This is required to fool knitr
into highlighting source code. Specifying it outside the document does not work as knitr
resets it to md
as soon as it sees the .Rmd
extension.
slidify
is made available under the MIT License
MIT License
Copyright (C) 2012 Ramnath Vaidyanathan
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.