r - 在 ioslides 演示文稿中使用 bookdown 命令
问题描述
bookdown
在 R markdown 演示文稿中使用输出格式为“beamer”的命令可以正常工作(另请参阅此 SO-post)。在 YAML 标头中,只需从
output:
beamer_presentation: default
至
output:
bookdown::pdf_book:
base_format: rmarkdown::beamer_presentation
但是,如何bookdown
在 R markdown 演示文稿中使用输出格式为“ioslides”的命令
MWE:
---
title: "ioslides_presentation with bookdown commands"
output:
ioslides_presentation: default
# Not working:
# bookdown::pdf_book:
# base_format: rmarkdown::ioslides_presentation
---
# Set of slides
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE)
```
## Slide with bookdown cross references
- Figure: \@ref(fig:plot)
- Table: \@ref(tab:table)
- Slide without ref: \@ref(some-slide)
- Slide with ref: \@ref(slide-with-ref)
## Slide with Plot
```{r plot, fig.cap='Plot caption'}
plot(pressure)
```
## Slide with Table
```{r table}
knitr::kable(head(mtcars[, 1:3]),
caption = "Table caption")
```
## Some Slide
Some text
## Another Slide {#slide-with-ref}
Some more text
解决方案
推荐阅读
- node.js - 为 jest 和 mongodb 设置文件的最佳方法
- ios - 如何在 Ionic Alert 输入字段上防止 iOS 缩放
- javascript - chrome.tabs.onUpdated 有效,但 chrome.webNavigation.onCompleted 在发送消息时无效
- sql - 将无限长度的 SQL 字符串拆分为两列
- mysql - 我可以创建视图,但无法在 phpmyadmin 中显示表格视图
- python - 如何解析来自 GitHub API JSON 响应的信息?
- rest - 如何使用 Keycloak 通过令牌验证自定义 API
- python - 如何在 Dash 应用程序中正确使用两个 DatePickerSingle
- python - 400 错误,在 Flask 应用程序中加载带有表单和数据库的路由时
- excel - 插入大量数据