Select theme in Revealjs from pandoc
Asked Answered
H

3

6

When I run below command to generate slides from markdown, the theme not selected correctly.

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

My slide is in a directory with reveal.js there:

|-- 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 it still not use the theme.

Humbert answered 9/2, 2015 at 17:13 Comment(0)
M
4

Take a look at:

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

The syntax you need is very likely

--variable theme="beige"

Marilee answered 18/5, 2015 at 15:11 Comment(0)
H
3

For me the solution was to upgrade pandoc from version 1.12 to 1.18

This is the line that I'm using for my transformation:

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

In order to upgrade pandoc

Download the latest pandoc version 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> 
Hypsometer answered 1/11, 2016 at 0:59 Comment(1)
Good advice because reveal.js url is dead nowVeda
C
2

If I remember correctly the syntax is like this:

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

(it might even be case-sensitive if you are on *nix)

Celtic answered 9/2, 2015 at 17:17 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.