【问题标题】:Select theme in Revealjs from pandoc从 pandoc 中选择 Revealjs 中的主题
【发布时间】:2015-02-09 17:13:43
【问题描述】:

当我运行以下命令从 Markdown 生成幻灯片时,主题选择不正确。

pandoc slides -o slides.html -s -V theme=beige -t revealjs

我的幻灯片在一个带有reveal.js的目录中:

|-- reveal.js
|   |-- css
|   |   |-- reveal.min.css
|   |   `-- theme
|   |       |-- beige.css
|   |-- js
|   |   |-- reveal.js
|   |   `-- reveal.min.js
|   `-- lib
|       |-- css
|       |   `-- zenburn.css
|       `-- js
|           |-- classList.js
`-- slides.md

但它似乎仍然没有使用主题。

【问题讨论】:

    标签: pandoc reveal.js


    【解决方案1】:

    看看:

    https://gist.github.com/aaronwolen/5017084

    你需要的语法很有可能

    --variable theme="beige"

    【讨论】:

      【解决方案2】:

      对我来说,解决方案是将 pandoc 从 1.12 版本升级到 1.18

      这是我用于转换的线:

      pandoc -t revealjs -s \
             -V theme=beige #specify the theme
             -V revealjs-url=https://cdn.jsdelivr.net/reveal.js/3.0.0 \#use a cdn so that I don't need to have it installed
              ./my_slides.md  -o my_slides.html
      

      为了升级 pandoc

      从这里下载最新的 pandoc 版本:https://github.com/jgm/pandoc/releases/latest

      然后

      sudo aptitude purge pandoc #uninstall current pandoc
      sudo dpkg -i <name of the file you just downloaded> 
      

      【讨论】:

      • 好建议,因为reveal.js url 现在已经失效了
      【解决方案3】:

      如果我没记错的话,语法是这样的:

      pandoc slides -o slides.html -s -V theme:beige -t revealjs
      

      (如果您在 *nix 上,它甚至可能区分大小写)

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2011-11-01
        • 1970-01-01
        • 2022-08-17
        • 2017-06-30
        相关资源
        最近更新 更多