Coder Social home page Coder Social logo

reveal.js-with-pandoc's Introduction

reveal.js的pandoc模板

reveal.js的说明请看这里

文件说明

除了原版的reveal.js库里的文件以外,增加的文件有:

  • template-revealjs.html pandoc模板文件
  • slides.md 示例文件
  • /css/custom.css 用户自定义的样式文件

index.html是原版的演示文件,slides.md是我的示例文件,编译之后为slides.html,点这里查看效果

使用方法

如果源文件是Rmd文件,先用knitr处理

library(knitr)
knit("slides.Rmd")

得到md文件后运行命令:

pandoc -t html5 --template=template-revealjs.html --standalone --section-divs   --variable theme="default"   --variable transition="cube" slides.md -o slides.html

可直接运行build.bat批处理文件

注意,不管是直接在命令行下输命令,还是执行批处理文件,可以设置两个参数

  • theme 可选的reveal.js主题有:"sky", "beige", "simple","serif", "night", "default"
  • transition 可选的slides切换方式有:"default", "cube","page", "concave", "zoom", "linear", "fade", "none"

如果slides里有公式,需要在编译命令里加上--mathml选项

pandoc -t html5 --template=template-revealjs.html --mathml --standalone --section-divs   --variable theme="sky"   --variable transition="cube" slides.md -o slides.html

暂时只实现了用MathML来实现数学公式,其他方法还在摸索中。

其他

可以在http://rvl.io上在线编辑reveal.js的slides

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.