Skip to content

Instructions and template for pandoc config using revealjs and mathjax

Notifications You must be signed in to change notification settings

dajuno/pandoc-revealjs-mathjax

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Local RevealJS/MathJax3 setup for pandoc

Requirements

  • pandoc is installed

Installation and configuration:

  1. Download and extract https://github.com/hakimel/reveal.js/archive/master.zip
    wget https://github.com/hakimel/reveal.js/archive/master.zip
    unzip master.zip
    
    (Will unzip revealjs to folder reveal.js-master.)
  2. Install mathjax:
npm install mathjax@3
  1. Configure pandoc revealjs template for MathJax3:
  2. Set mathjaxurl in the header of the presentation markdown file:
  • mathjaxurl: node_modules/mathjax/es5/tex-mml-chtml.js for the local installation
  • mathjaxurl: /usr/share/mathjax/tex-mml-chtml.js or similar for a (possible) system package
  • mathjaxurl: https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js for the CDN package (works only with an internet connection; default when mathjaxurl is not specified)

Compilation with pandoc

Assuming, the revealjs and node_modules folders, pandoc template (modified default.revealjs, renamed template.md) and presentation markdown file (pres.md) are all located in the current path:

pandoc -s --mathjax -i -t revealjs pres.md --template=template.md -V center=false -V history=false -V revealjs-url=reveal.js-master -o pres.html

Alternatively, the Makefile can be used to invoke the pandoc command, via

make

It detects automatically, if a template.md file is present.

About

Instructions and template for pandoc config using revealjs and mathjax

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published