我有一个用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
---有什么想法吗?
发布于 2018-11-20 19:51:15
最后,我找到了正确的方法:
---
output:
revealjs::revealjs_presentation:
css: styles.css
reveal_options:
width: 1200
---https://stackoverflow.com/questions/53390133
复制相似问题