如何在 Rmarkdown 中中断项目的增量列表,然后在绘图或图形之后重新获取它? [英] How to interrupt an incremental list of items in Rmarkdown, then retake it after a plot or figure?

查看:70
本文介绍了如何在 Rmarkdown 中中断项目的增量列表,然后在绘图或图形之后重新获取它?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我真的很想用 RStudio 中断在 Rmarkdown 中创建的项目的增量列表,以显示图表和数字,然后重新突出显示列表.这在 Latex 中非常简单,但我无法弄清楚如何使用 Rmarkdown 实现相同的结果.下面是一些投影仪示例.

I'm really interested in interrupting incremental lists of items created in Rmarkdown with RStudio, to show plots and figures, then retake the list highlighting. This is quite straightforward in Latex, but I couldn't figure out how to achieve the same result using Rmarkdown. Below is some beamer example.

---
title: "Sample Document"
author: "Author"
output:
 beamer_presentation:
  fonttheme: structurebold
  highlight: pygments
  incremental: yes
  keep_tex: yes
  theme: AnnArbor
  toc: true
  slide_level: 3
---

# Some stuff 1
### Some very important stuff

- More detail on stuff 1 
- More detail on stuff 1
- More detail on stuff 1

# The following chart should appear between the first and second item above

```{r, prompt=TRUE}
summary(iris[, "Sepal.Length"])

# Stuff 2
### There are other kinds of stuff?

```{r, prompt=TRUE}
summary(mtcars[, "cyl"])

推荐答案

您可以在项目之间插入幻灯片,如下所示:

You can insert slides in between the items like this:

---
title: "Sample Document"
author: "Author"
output:
 beamer_presentation:
  fonttheme: structurebold
  highlight: pygments
  incremental: yes
  keep_tex: yes
  theme: AnnArbor
  toc: true
  slide_level: 3
---

# Some stuff 1
``` {=latex}
\end{frame}
\begin{frame}<1>[label=foo]
\frametitle{some very important stuff}
```


- More detail on stuff 1 
- More detail on stuff 1
- More detail on stuff 1

``` {=latex}
\end{frame}
```

### Some chart

insert chart here

``` {=latex}
\end{frame}
\againframe<2->{foo}
```

### other stuff

这篇关于如何在 Rmarkdown 中中断项目的增量列表,然后在绘图或图形之后重新获取它?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆