Skip to content
ramnathv edited this page Oct 26, 2012 · 6 revisions

Hacking RStudio to Run Slidify

NOTE. This hack works only with version 0.3.0 and above. These have not been pushed to the github repo as yet.

A simple way to hack RStudio to get a one-click interface to Slidify using the Knit HTML button, is to add these lines to the .Rprofile file in your slide directory.

options(rstudio.markdownToHTML = 
  function(inputFile, outputFile){
    require(slidify)
    slidify(inputFile, outputFile, knit_deck = F) 
  }
)

This tells RStudio to use Slidify as the rendering function for your Rmd file. We set knit_deck to FALSE, since the Knit HTML button first knits the file before passing it on to the rendering function. For more details, please refer to this RStudio article on [custom rendering] (http://rstudio.org/docs/authoring/markdown_custom_rendering)

Warning: This alters the behavior of the Knit HTML button as a result of which, you will not be able to convert regular Rmd files in the slide directory to HTML using the button.

Note. The slide deck does not preview in RStudio's HTML preview. The solution is to open the html file in your browser and refresh it after slidifying it. There is an alternate solution that automates the entire process using make and watch. I will document it later.

Blog Posts to Write

Here is a list of blog posts that I plan to write in the context of HTML5 slides and markdown converters.

  1. Building a Universal API for Markdown to HTML5 Slide Conversion

Comparison of HTML5 Slide Generation Frameworks

The objective of this note is to compare the feature set across HTML5 slide generation frameworks with a view to identifying which ones I should focus on supporting in slidify. Let me start with a laundry list of features that I have come across in the slide generation frameworks I have used.

Features

  1. Incremental Builds
  2. Table of Contents
  3. Speaker Notes
  4. Presenter View
  5. Slide Classes
  6. Syntax Highlighting
  7. Source View

Markdown to HTML5 Slide Converters

Ruby

  1. showoff
  2. slide-em-up
  3. slideshow

Python

  1. landslide

Slidify

  1. supports more than 10 different frameworks.
  2. powerful templating mechanism to render beautiful layouts.
  3. syntax highlighting out of the box.
  4. executes code in multiple languages

These are some projects on github that I found to be very similar to slidify.

  1. Slide-Em-Up
  2. Slideshow
Clone this wiki locally