首页 > 解决方案 > RStudio 和 RevealJS:reveal_options 不起作用

问题描述

我是 RStudio 的新手,所以我希望有人可以帮助我。我正在使用 RevealJS,但是当我尝试使用他们的视差背景功能时,它会不断在最终的 html 中添加额外的引号。

这是我的 R 代码:

output:
  revealjs::revealjs_presentation:
    css: style.css
    reveal_options:
      width: 1280
      height: 720
      parallaxBackgroundImage: Example_Image.png
      parallaxBackgroundSize: 2000px 1125px

这是html输出:

  <script>

  // Full list of configuration options available at:
  // https://github.com/hakimel/reveal.js#configuration
  Reveal.initialize({
    // 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
    // Parallax background image
    parallaxBackgroundImage: ''Example_Image.png'', // e.g. "'https://s3.amazonaws.com/hakim-static/reveal-js/reveal-parallax-1.jpg'"
    // Parallax background size
    parallaxBackgroundSize: ''2000px 1125px'', // CSS syntax, e.g. "2100px 900px"
    // The "normal" size of the presentation, aspect ratio will be preserved
    // when the presentation is scaled to fit different resolutions. Can be
    // specified using percentage units.
    width: 1280,
    height: 720,



    // Optional reveal.js plugins
    dependencies: [
    ]
  });
</script>

我不知道如何避免在“Example_Image.png”和“2000px 1125px”周围出现额外的引号。有谁知道如何解决这个问题?

标签: rrstudioreveal.js

解决方案


推荐阅读