xaringan slide separator not separating slides

冷暖自知 提交于 2019-12-23 07:46:22

问题


In this example xaringan presentation, why are both the ## blank page and the leaflet map on the same slide, given I've separated them by the new-slide separator --- ?

---
title: "map test"
output:
  xaringan::moon_reader:
    css: ["default"]
    nature:
      highlightLines: true
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```


## blank page

content 

--- 

leaflet page

```{r}
library(leaflet)
leaflet() %>%
  addTiles()

```

---


回答1:


Looks like you've got an unintended space after the new slide separator after blank content as "--- ". Remove that space and it'll be recognized as real slide separator:

---
title: "map test"
output:
  xaringan::moon_reader:
    css: ["default"]
    nature:
      highlightLines: true
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```


## blank page

content 

---

leaflet page

```{r}
library(leaflet)
leaflet() %>%
  addTiles()

```

---


来源:https://stackoverflow.com/questions/51120186/xaringan-slide-separator-not-separating-slides

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!