How do I get vertical slides using Rpres markdown
Asked Answered
T

2

6

I'm using R markdown in a Rpres file, in RStudio.

I understand that this is using reveal.js, which can do vertical slides.

What markdown do I need to type to get it to create a vertical slide? All my attempts so far (--, ---, type:subsection) still result in a simple set of horizontal slides and only left right navigation

Temptation answered 9/4, 2014 at 14:4 Comment(0)
D
4

I'm having the same problem. I haven't figured out how to get this to work even using the latest Rstudio build with pandoc and using .Rmd slides instead of the default Rpres.

I am closer than I was using Rpres, though, because the up and down arrows actually show up when you use the .Rmd slides. Maybe you'll be able to get it to work if you switch?

Edit:

Ok, did a bit more digging. I wish there was a better way, but if you use some non-markdown HTML, you can get down slides (with the pandoc/.Rmd changes as well...)

<section> <h1>Overall Section Title </h1>

# New slide title

# Another slide

---

## Sub-slide

---

## Sub-slide

</section>

All slides within the will be up/down slides.

Downpour answered 24/5, 2014 at 17:52 Comment(0)
D
7

Ok, this is a bit old at this point, but for the sake of completeness:

If you install the revealjs package:

library(devtools)
install_github("jjallaire/revealjs")
# or "srvanderplas/revealjs" if you want slide numbers by default

and use

title: "Awesome revealjs presentation"
author: "Your name"
output: 
  revealjs::revealjs_presentation:
    pandoc_args: [ "--slide-level", "2" ]

in your preamble

then H1 (# in markdown) will make a new top-level slide, and H2 (## in markdown) will make a new vertical slide under a top-level slide.

Downpour answered 16/3, 2015 at 13:58 Comment(0)
D
4

I'm having the same problem. I haven't figured out how to get this to work even using the latest Rstudio build with pandoc and using .Rmd slides instead of the default Rpres.

I am closer than I was using Rpres, though, because the up and down arrows actually show up when you use the .Rmd slides. Maybe you'll be able to get it to work if you switch?

Edit:

Ok, did a bit more digging. I wish there was a better way, but if you use some non-markdown HTML, you can get down slides (with the pandoc/.Rmd changes as well...)

<section> <h1>Overall Section Title </h1>

# New slide title

# Another slide

---

## Sub-slide

---

## Sub-slide

</section>

All slides within the will be up/down slides.

Downpour answered 24/5, 2014 at 17:52 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.