Imprint | Privacy Policy

How to create presentations with emacs-reveal

(Press ? for help, n and p for next and previous slide)

Jens Lechtenbörger (License Information)
March 2019 (emacs-reveal 0.9.9 and later)

Presentation Hints


  • This is a reveal.js presentation
  • Key bindings and navigation
    • Press “?” to see key bindings of reveal.js
      • In general, “n” and “p” move to next and previous slide; mouse wheel works as well
      • Search with Ctrl-Shift-F
    • Up/down (swiping, arrows) move within sections, left/right jump between sections (type “o” to see what is where)
    • Type slide’s number followed by Enter to jump to that slide
    • Browser history (buttons, Alt-CursorLeft, Alt-CursorRight)
    • Zoom with Ctrl-Mouse or Alt-Mouse

Offline work

  • Students often ask for download-able presentations
  • Alternatives
    1. Clone repository, build presentations locally (see Usage)
    2. Download build artifacts from recent pipeline (if not expired)
    3. Generate PDF
      • Why, really?
        • Why not download source files instead?
        • Org mode, which is plain text
      • Change the URL by adding “?print-pdf” after “.html”, then print to PDF file (usually, Ctrl-p)
      • Alternatively, generate PDF via LaTeX from Org source file


(Speaker) Notes

  • Slides contain additional notes as plain text if you see the folder icon at the top right (as on this slide)


    • Either press “v” to see the “courseware view” or click on that icon or press “s” to see the “speaker notes view”
    • You need to allow pop-ups
      • If the pop-up window does not work, you may need to press “s” twice or close the pop-up window once


What’s This?

  • Emacs-reveal is free software to generate reveal.js presentations (slides with audio) from simple text files in Org mode

    Presenter explaining technical sketch on board

    Image ” under CC0; converted from Pixabay

    • Benefits
      • For your audience
        • Self-contained presentations embedding audio
        • Usable on lots of (including mobile and offline) devices with just a browser
      • For you as producer
        • Separation of layout and contents (similarly to, e.g., LaTeX)
        • Simple text format allows diff and merge for ease of collaboration


  • I suppose (and strongly recommend) that you use GNU/Linux (help on getting started)
    • Actually, not much here is operating system specific
  • Emacs-reveal should really be used with the text editor GNU Emacs
    • (You could try other editors and build presentations within GitLab, thanks to GitLab’s infrastructure)
      • (In fact, you do not need an editor at all but could edit presentations using a Web browser on, e.g., with the Web IDE (requires login))


Install via Git

  • As quickstart, inspect this Howto
    • Which embeds emacs-reveal as submodule and contains source file of Howto,
      • Install emacs-reveal-howto
        • git clone
        • cd emacs-reveal-howto/
      • Install submodules (including emacs-reveal)
        • git submodule sync --recursive
        • git submodule update --init --recursive
      • Install and configure Emacs packages
        • emacs --batch --load emacs-reveal/install.el --funcall install
        • Add a line like this to ~/.emacs
          • (load "/path/to/emacs-reveal/emacs-reveal.el")
      • Generate the HTML presentation from Org source
        • emacs --batch --load elisp/publish.el --funcall org-publish-all

Emacs-reveal like a Package?

  • The directory emacs-reveal can be located anywhere
    • Also under ~/.emacs.d/elpa
  • However, note that emacs-reveal contains some resources (Org, CSS, HTML files)
    • To use them, your publish function needs to know their location
      • (As in emacs-reveal-publish.el used by elisp/publish.el of this Howto)
      • Relevant customize variables include emacs-reveal-dir and emacs-reveal-submodules-dir
      • Maybe create a symbolic link
        • cd <dir-with-org-file>; ln -s <dir-of-emacs-reveal>



  1. Create presentations locally on Command Line
  2. Create presentations in GNU Emacs
  3. Create and publish presentations on GitLab

    GitLab Logo

    GitLab Logo ” by GitLab under CC BY-NC-SA 4.0; from

Build Presentations on Command Line

  1. Create Org file in directory emacs-reveal-howto
    • See contained source file for this presentation,
  2. Build presentations for files ending in .org (except internal ones listed in elisp/publish.el)
    • emacs --batch --load elisp/publish.el --funcall org-publish-all
    • Presentations are built in subdirectory public/
  3. Open presentation in Firefox
    • E.g.: firefox public/howto.html
  4. Optional: Copy public/ to public web server

Building Presentations in Emacs

  1. Generate HTML presentation for visited .org file using Org export functionality:
    Press C-c C-e v b
    • This generates HTML file in current directory and opens it in default browser
    • For this to work, necessary resources, in particular reveal.js, must be accessible in .org file’s directory
      • I use emacs --batch --load elisp/publish.el --funcall org-publish-all once to populate public/, then create a symbolic link:

        ln -s public/reveal.js

      • For image grids, you may need:

        (setq emacs-reveal-export-dir "./")

Build Presentations on GitLab

  1. Fork or clone emacs-reveal-howto on GitLab (fork documentation)
    • git clone <the URL of YOUR GitLab project>
  2. Create project’s files locally
  3. Create or update Org files in cloned directory, add, commit, and push (see next slide)
  4. GitLab infrastructure picks up changes and publishes presentations as GitLab Pages
    • Takes some minutes
    • Go to Settings → Pages to see the Pages’ address

Some Presentation Features

Text Slide

  • A list
  • With a sub-list whose items appear
    • This is emphasized
    • This is bold
    • This looks like code
    • This is green
    • Nothing special

Some Fragment Styles

  • Forget
  • Shrink
  • Grow
  • Very important

Fragments with Custom Order

  • I’m first.
  • Fourth.
  • Third.
  • Second.
  • I’m also first.

Centered Text

Just some horizontally centered text. Created by assigning a class with text-align: center.

On Sections

  • This slide is part of section Some Presentation Features
    • We can link to slides, e.g., an earlier slide
      • You can use the browser history to go back
    • Side note: Check source code to see two variants of link targets used on this slide
  • This slide can also be perceived as its own subsection
  • (This list item appears simultaneously with previous bullet point)

Another Slide

  • This slide is on a deeper level of nesting
  • This level of nesting is not shown in the table of contents in the slide’s bottom
  • By the way, the headings in the table of contents below are hyperlinks
    • And your browser remembers the history, back/forward buttons and shortcuts should work
    • Mousewheel and swiping work

Two Columns: Pro/Con of emacs-reveal


  • Free/libre open source software
  • Device-independent presentations
    • Also mobile and offline
    • Generated from simple text format
      • Easy to learn
      • Collaboration with diff/merge/git
      • Separation of layout and content


  • (Need to learn something new)

Figures and Audio

Slide with Figure and Audio

Figure with Caption and License

  • Display image with meta-data specified in file
    • Simplify sharing of images with source and license
  • Functionality and meta-data format are specific to emacs-reveal
    • See next slide for sample file

Balance tipping in favor of Yes

To share or not to share

Image ” under CC0; converted from Pixabay

Meta-Data File for Previous Image

;; Semicolon starts comment until end of line (Emacs Lisp).
;; Note that the line for dc:title below is just a comment.  In that
;; case, "Image" is used as generic title; uncomment for real title.
;; CC0 does not require attribution of author/creator; uncomment if needed.

((filename . "./figures/3d-man/decision-1013751_1920.jpg") ; Note the path prefix
; (dc:title . "The title given by the author")
 (licenseurl . "")
 (licensetext . "CC0")
; (cc:attributionName . "Jens Lechtenbörger")
; (cc:attributionURL . "")
 (dc:source . "")
 (sourcetext . "Pixabay")
 (imgalt . "Balance tipping in favor of Yes")
 (imgadapted . "converted from") ; Adjust as needed
 (texwidth . 0.5) ; Width in percent of textwidth for LaTeX export

An Image Grid: Computers


Server ” under CC0; from Pixabay


C64 ” under CC0; from Pixabay


Notebook ” under CC0; from Pixabay


Router ” under CC0; from Pixabay


Car ” under CC0; from Pixabay


Doll ” under CC0; from Pixabay


TV ” under CC0; from Pixabay

Smart watch

Smart watch ” under CC0; cropped from Pixabay

Fairphone 2

Fairphone 2 ” by Kaihsu Tai under CC BY-SA 4.0; cropped from Wikimedia

Creation of Previous Image Grid

  • Single line in source file, using macro revealgrid

    {{{revealgrid(42,"./figures/devices/computer.grid",60,4,3,"\"ga1 ga2 ga2 ga3\" \"ga1 ga4 ga5 ga6\" \"ga7 ga8 ga9 ga9\"")}}}
    • Arguments explained in emacs-reveal/org/
    • With file computer.grid as follows


Appearing Items with Audio

(Audios produced with MaryTTS, converted to Ogg format with Audacity)

  • One
  • Two
  • Three


Quiz Plugin

Sample Quiz

Klipse for Code Evaluation

  • Org-re-reveal supports Klipse
    • Teach programming
      • Code changes in upper part result in output changes in lower part
    • Browser-side code evaluation for various programming languages
      • See org-re-reveal-klipse-languages for supported subset
        • clojure, html, javascript, js, php, python, ruby, scheme
      • Either variable org-re-reveal-klipsify-src needs to be non-nil or code block needs to have #+ATTR_REVEAL: :klipsify t
        • (You can also specify :klipse-width and :klipse-height)
      • Due to an issue in Klipse, you may need to use an older or non-minified version of Klipse
  • Code on next two slides copied from README of Org-Reveal

HTML Src Block

  • Above code block activates Klipse via #+ATTR_REVEAL: :klipsify t
    • Regardless of org-re-reveal-klipsify-src
  • Subsequent code blocks do not do so

Javascript Src Block

PHP Src Block

Python Src Block

The End

Further Reading

Go for it!

Person taking steps to top

The road ahead …

Image ” under CC0; converted from Pixabay

License Information

Except where otherwise noted, this work, “How to create presentations with emacs-reveal”, is © 2017, 2018, 2019 by Jens Lechtenbörger, published under the Creative Commons license CC BY-SA 4.0.

No warranties are given. The license may not give you all of the permissions necessary for your intended use.

In particular, trademark rights are not licensed under this license. Thus, rights concerning third party logos (e.g., on the title slide) and other (trade-) marks (e.g., “Creative Commons” itself) remain with their respective holders.