r - rmarkdown 笔记本中的 bookdown 扩展
问题描述
我想在html_notebook
用作我的输出格式时使用一些 bookdown 扩展。例如,这有效:
---
output: bookdown::html_document2
---
```{theorem}
My proof here.
\```
knitr::knit("test.rmd", "test.html")
但这不会:
---
output: html_notebook
---
```{theorem}
My proof here.
\```
knitr::knit("test.rmd", "test.html")
有没有办法在 rmarkdown 笔记本中使用这些扩展?
解决方案
您可以使用以下输出定义:
output:
bookdown::html_document2:
base_format: rmarkdown::html_notebook
此功能的手册可以在这里找到:https ://bookdown.org/yihui/bookdown/a-single-document.html
推荐阅读
- unity3d - 阻止粒子与相机一起滚动(统一)
- sql-server - TSQL 包含有条件的帐户
- java - 在这种情况下,为什么我会收到错误“Bean name 'user' 的 BindingResult 和普通目标对象都不能用作请求属性”?
- c++ - 制作可用于初始化向量的迭代器
- javascript - 对象作为 React 子项无效 - 文本输入
- performance - 数据流不同的操作不缩放
- asp.net-web-api - Eventbrite APi:获取活动的门票/价格信息
- scipy - 如何编写灵活的多重指数拟合
- java - Spring boot - 从外部类路径加载文件
- java - 在 JTable 中使用自定义 TablecellRenderer