ramnathv / slidify-old

Generate reproducible html5 slides from R markdown. This repository has moved to `ramnathv/slidify`
http://ramnathv.github.com/slidify/
8 stars 0 forks source link

Consider making slidify pandoc-compatible #3

Closed ramnathv closed 12 years ago

ramnathv commented 12 years ago

Pandoc parses a markdown document into slides using the following rules (as taken from http://goo.gl/4CVWO)

ramnathv commented 12 years ago

On a related note, there seem to be multiple approaches taken to separating slides in a markdown document

  1. Most of the ruby based tools like showoff, keydown etc. seem to use !SLIDE foo bar to define a slide with class = "foo bar". Users can wrap the specification as <!SLIDE foo bar> so that the markdown document is rendered neatly, even as just a page. showoff has an extra feature thrown in that uses all <h1> tags as slide delimiters if it does not find any !SLIDE specification.
  2. In the python world tools like landslide and hieroglyph seem to prefer --- as slide separator and using reSt directives to specify slide classes and transitions.

I need to think more about the pros and cons of each approach, and what I would like to use for slidify. It might be a nice idea to do a survey on what people think about these options, and if it is important at all.

I personally like the <!SLIDE foo bar #id> idea since it is clean and allows easy parsing of slide classes and content. The only problem is that it might be cumbersome to write, over --- which is easy.

ramnathv commented 12 years ago

Right now, I have implemented the following.

  1. Preferred way to separate slides is to use !SLIDE foo bar or <!SLIDE foo bar>
  2. If no !SLIDE tag is found, a helper function searches for --- and replaces it with !SLIDE before slidification.
  3. If neither !SLIDE nor --- are found, then a helper function adds !SLIDE before ever ### heading.

I need to make this customizable, since different html frameworks use different default levels for slide titles.