ramnathv / slidify

Generate reproducible html5 slides from R markdown
http://www.slidify.org
844 stars 338 forks source link

reveal.js and vertical slides #403

Open ekstroem opened 10 years ago

ekstroem commented 10 years ago

Hi,

I'm trying to get my head around vertical slides when using reveal.js in combination with slidify. I would like the structure of the slides to be

Test Slide About
Where am I placed? Look at me

but I cannot get the Where am I placed? slide placed vertically under the first slide. The code I am running is shown below. I generate the html output from within RStudio running knitr.


---
title       : Test
subtitle    : 
author      : Some guy
job         : 
framework   : revealjs      # {io2012, html5slides, shower, dzslides, ...}
highlighter : highlight.js  # {highlight.js, prettify, highlight}
hitheme     : zenburn       # 
widgets     : [mathjax]     # {mathjax, quiz, bootstrap}
mode        : selfcontained # {standalone, draft}
knit        : slidify::knit2slides
revealjs    :
  theme: serif
--- 

## Test slide

***

## Where am I placed?

--- &vertical

## About

***

## Look at me

If I run this code then the Where am I placed? slide disappears. This makes sense since there's no &vertical argument to the separator above it. However, if I change the last bit of the YAML to

knit        : slidify::knit2slides
revealjs    :
  theme: serif
--- &vertical 

then the parsing of the YAML goes haywire. Is this possible without creating a blank first slide?

On a slightly different note: can I set the build-up such that some blocks/slides are build upwards instead of downwards?

ramnathv commented 10 years ago

Having anything other than --- for the first slide is problematic if you are using the rstudio knit to html button, since it uses rstudio's rmarkdown parser. If you run slidify from your R console, it should work, since it will use slidify's yaml parser, which recognizes metadata in the slide separator line.

Let me know if my suggested workaround works. Longer term, I will work on a way to get this fixed by talking to rstudio.

ekstroem commented 10 years ago

Yes running slidifyfrom console works perfectly. Thank you. Have been working entirely within RStudio so far but will just drop that for this particular case. I'll close this since it a problem with RStudio and not really slidify.

ramnathv commented 10 years ago

@ekstroem thanks for confirming that it works. i am reopening this issue so that i have it on my to-do list.