Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

xaringan slide separator not separating slides

Tags:

r

xaringan

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()

```

---

enter image description here

like image 994
SymbolixAU Avatar asked Jul 01 '18 03:07

SymbolixAU


1 Answers

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()

```

---
like image 56
Yue Jiang Avatar answered Oct 04 '22 02:10

Yue Jiang