【发布时间】:2018-11-20 09:42:48
【问题描述】:
我在 Rmarkdown 中使用此 YAML 标头制作了一个revealjs 演示文稿:
---
title: "My title"
author: "My name"
date: November 20, 2018
output:
revealjs::revealjs_presentation:
css: styles.css
---
效果很好,但现在我想在Reveal.initialize 中调整width。现在我直接在生成 Rmarkdown 的 html 中进行操作,几乎在文件末尾:
// Full list of configuration options available at:
// https://github.com/hakimel/reveal.js#configuration
Reveal.initialize({
width: 1000,
// Push each slide change to the browser history
history: true,
// Vertical centering of slides
center: false,
// Transition style
transition: 'default', // none/fade/slide/convex/concave/zoom
// Transition style for full page slide backgrounds
backgroundTransition: 'default', // none/fade/slide/convex/concave/zoom
我希望能够从 Rmarkdown 的 YAML 中做到这一点。这个方法我试过了,还是不行:
---
title: "My title"
author: "My name"
date: November 20, 2018
output:
revealjs::revealjs_presentation:
css: styles.css
revealjs::revealjs_config:
width: 1200
---
有什么想法吗?
【问题讨论】:
标签: r-markdown reveal.js