Choose a theme in Revealjs from pandoc

When I run the command below to create markdown slides, the theme is not selected correctly.

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

My slide is in the drop-down directory:

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

But it seems he is still not using the theme.

+6
source share
3 answers

Take a look at:

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

The syntax you need is very likely

--variable theme="beige"

+4
source

For me, there was a decision to upgrade pandoc from version 1.12 to 1.18

This is the line I use for my conversion:

 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 

To update pandoc

Download the latest pandoc from here: https://github.com/jgm/pandoc/releases/latest

Then

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

If I remember correctly, the syntax looks like this:

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

(it may be case sensitive if you are on * nix)

+2
source

Source: https://habr.com/ru/post/982224/


All Articles