Xaringan 中断幻灯片中编号列表的编号
Xaringan interrupts numbering of numbered list across slides
以下面的最小示例为例。当我希望幻灯片 2 的列表以 2 开头时,列表的编号在幻灯片 2 中重新开始为 1。经过密集 Google 搜索,我尝试了 中给出的建议(参见幻灯片 3和下面的幻灯片 4),但没有成功。谢谢!
---
title: "Presentation Ninja"
subtitle: "⚔️ xaringan +<br/>😎 xaringanthemer"
author:
- "Yihui Xie"
- "Garrick Aden-Buie"
date: '`r Sys.Date()`'
output:
xaringan::moon_reader:
css: xaringan-themer.css
nature:
slideNumberFormat: "%current%"
highlightStyle: github
highlightLines: true
ratio: 16:9
countIncrementalSlides: true
---
```{r setup, include=FALSE}
options(htmltools.dir.version = FALSE)
knitr::opts_chunk$set(
fig.width=9, fig.height=3.5, fig.retina=3,
out.width = "100%",
cache = FALSE,
echo = TRUE,
message = FALSE,
warning = FALSE,
hiline = TRUE
)
```
```{r xaringan-themer, include=FALSE, warning=FALSE}
library(xaringanthemer)
style_duo_accent(
primary_color = "#1381B0",
secondary_color = "#FF961C",
inverse_header_color = "#FFFFFF"
)
```
## slide 1
1. firt item
- sub-item
---
## slide 2
2. second item
- sub-item
---
## slide 3
<ol>
<li> Sed ut perspiciatis unde omnis iste natus error...
<li> Nemo enim ipsam voluptatem quia voluptas sit...
</ol>
---
## slide 4
<ol start=3>
<ol>
<li> Sed ut perspiciatis unde omnis iste natus error...
<li> Nemo enim ipsam voluptatem quia voluptas sit...
</ol>
先生保罗,你好:)
在使用 <ol start = "3">
时,您应该删除冗余标签 <ol>
代码:
---
## slide 3
<ol>
<li> Sed ut perspiciatis unde omnis iste natus error...
<li> Nemo enim ipsam voluptatem quia voluptas sit...
</ol>
---
## slide 4
<ol start="3">
<li> Sed ut perspiciatis unde omnis iste natus error...
<li> Nemo enim ipsam voluptatem quia voluptas sit...
</ol>
输出:
一个加法:
## slide 4
<ol start="3">
3. Sed ut perspiciatis unde omnis iste natus error... <br>
<p style="margin-left: 25px;"> ○(or ◦) sub-item </p>
4. Nemo enim ipsam voluptatem quia voluptas sit...
</ol>
以下面的最小示例为例。当我希望幻灯片 2 的列表以 2 开头时,列表的编号在幻灯片 2 中重新开始为 1。经过密集 Google 搜索,我尝试了
---
title: "Presentation Ninja"
subtitle: "⚔️ xaringan +<br/>😎 xaringanthemer"
author:
- "Yihui Xie"
- "Garrick Aden-Buie"
date: '`r Sys.Date()`'
output:
xaringan::moon_reader:
css: xaringan-themer.css
nature:
slideNumberFormat: "%current%"
highlightStyle: github
highlightLines: true
ratio: 16:9
countIncrementalSlides: true
---
```{r setup, include=FALSE}
options(htmltools.dir.version = FALSE)
knitr::opts_chunk$set(
fig.width=9, fig.height=3.5, fig.retina=3,
out.width = "100%",
cache = FALSE,
echo = TRUE,
message = FALSE,
warning = FALSE,
hiline = TRUE
)
```
```{r xaringan-themer, include=FALSE, warning=FALSE}
library(xaringanthemer)
style_duo_accent(
primary_color = "#1381B0",
secondary_color = "#FF961C",
inverse_header_color = "#FFFFFF"
)
```
## slide 1
1. firt item
- sub-item
---
## slide 2
2. second item
- sub-item
---
## slide 3
<ol>
<li> Sed ut perspiciatis unde omnis iste natus error...
<li> Nemo enim ipsam voluptatem quia voluptas sit...
</ol>
---
## slide 4
<ol start=3>
<ol>
<li> Sed ut perspiciatis unde omnis iste natus error...
<li> Nemo enim ipsam voluptatem quia voluptas sit...
</ol>
先生保罗,你好:)
在使用 <ol start = "3">
<ol>
代码:
---
## slide 3
<ol>
<li> Sed ut perspiciatis unde omnis iste natus error...
<li> Nemo enim ipsam voluptatem quia voluptas sit...
</ol>
---
## slide 4
<ol start="3">
<li> Sed ut perspiciatis unde omnis iste natus error...
<li> Nemo enim ipsam voluptatem quia voluptas sit...
</ol>
输出:
一个加法:
## slide 4
<ol start="3">
3. Sed ut perspiciatis unde omnis iste natus error... <br>
<p style="margin-left: 25px;"> ○(or ◦) sub-item </p>
4. Nemo enim ipsam voluptatem quia voluptas sit...
</ol>