I'm using R markdown in a Rpres file, in RStudio.
我在RStudio的Rpres文件中使用R markdown。
I understand that this is using reveal.js, which can do vertical slides.
我知道这是使用reveal.js,它可以做垂直幻灯片。
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
我需要输入什么降价来创建垂直幻灯片?到目前为止我所有的尝试( - ,---,类型:子部分)仍然会产生一组简单的水平幻灯片,只有左侧导航
2 个解决方案
#1
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.
我遇到了同样的问题。我还没弄明白如何使用最新的带有pandoc的Rstudio构建并使用.Rmd幻灯片而不是默认的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?
不过,我比使用Rpres更接近,因为当您使用.Rmd幻灯片时,向上和向下箭头实际显示。如果你转换,也许你能够让它发挥作用?
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...)
好的,做了一点挖掘。我希望有更好的方法,但如果你使用一些非降价HTML,你可以下载幻灯片(同时pandoc / .Rmd更改...)
<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.
其中的所有幻灯片都是向上/向下幻灯片。
#2
6
Ok, this is a bit old at this point, but for the sake of completeness:
好的,这点有点陈旧,但为了完整起见:
If you install the revealjs package:
如果您安装revealjs包:
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.
然后H1(降价中的#)将创建一个新的*幻灯片,而H2(降价中的##)将在*幻灯片下创建一个新的垂直幻灯片。
#1
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.
我遇到了同样的问题。我还没弄明白如何使用最新的带有pandoc的Rstudio构建并使用.Rmd幻灯片而不是默认的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?
不过,我比使用Rpres更接近,因为当您使用.Rmd幻灯片时,向上和向下箭头实际显示。如果你转换,也许你能够让它发挥作用?
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...)
好的,做了一点挖掘。我希望有更好的方法,但如果你使用一些非降价HTML,你可以下载幻灯片(同时pandoc / .Rmd更改...)
<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.
其中的所有幻灯片都是向上/向下幻灯片。
#2
6
Ok, this is a bit old at this point, but for the sake of completeness:
好的,这点有点陈旧,但为了完整起见:
If you install the revealjs package:
如果您安装revealjs包:
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.
然后H1(降价中的#)将创建一个新的*幻灯片,而H2(降价中的##)将在*幻灯片下创建一个新的垂直幻灯片。