Reveal.js

The HTML Presentation Framework

A workshop by
Craig Rafter and Konstantinos Drakopoulos

Hello There

reveal.js enables you to create beautiful interactive slide decks using HTML. This presentation will show you examples of what it can do.

Workshop outline

  1. Reveal.js capabilities
  2. Making a reveal.js presentation
  3. Making your own presentation

Why Reveal.js?

  • Define files as text.
  • Version control your presention.
  • Beautiful consistent web formatting
  • Markdown and LaTeX out of the box

Alternatives

  • PowerPoint
  • LaTeX & Beamer
  • Slides.js
  • Deck.js
  • Prezi
  • Impress.js

Vertical Slides

Slides can be nested inside of each other.

Use the Space key to navigate through all slides.


Down arrow

Basement Level 1

Nested slides are useful for adding additional detail underneath a high level horizontal slide.

Basement Level 2

That's it, time to move on!

Slides

Slides are built using HTML and JavaScript. For those of you unfamiliar with web programming, reveal.js also allows Markdown to be used.

Point of View

Press ESC to enter the slide overview.

Hold down alt and click on any element to zoom in on it using zoom.js. Alt + click anywhere to zoom back out.

Terrific $\LaTeX$

The Cauchy-Schwartz Inequality
$\left( \sum_{k=1}^n a_k b_k \right)^2 \leq \left( \sum_{k=1}^n a_k^2 \right) \left( \sum_{k=1}^n b_k^2 \right)$

Terrific $\LaTeX$

A Cross Product Formula
$\mathbf{V}_1 \times \mathbf{V}_2 = \begin{vmatrix} \mathbf{i} & \mathbf{j} & \mathbf{k} \\ \frac{\partial X}{\partial u} & \frac{\partial Y}{\partial u} & 0 \\ \frac{\partial X}{\partial v} & \frac{\partial Y}{\partial v} & 0 \end{vmatrix}$

Terrific $\LaTeX$

Maxwell's Equations
$\begin{aligned} \nabla \times \vec{\mathbf{B}} -\, \frac1c\, \frac{\partial\vec{\mathbf{E}}}{\partial t} & = \frac{4\pi}{c}\vec{\mathbf{j}} \\ \nabla \cdot \vec{\mathbf{E}} & = 4 \pi \rho \\ \nabla \times \vec{\mathbf{E}}\, +\, \frac1c\, \frac{\partial\vec{\mathbf{B}}}{\partial t} & = \vec{\mathbf{0}} \\ \nabla \cdot \vec{\mathbf{B}} & = 0 \end{aligned}$

Powerful Plotting

Embed plotly.js or chart.js plots right into your slides!

Fragments

Hit the next arrow...

... to step through ...

... a fragmented slide.

Fragment Styles

There's different types of fragments, like:

grow

shrink

fade-out

current-visible

highlight-red

highlight-blue

Transition Styles

You can select from different transitions, like:
None - Fade - Slide - Convex - Concave - Zoom

Themes

reveal.js comes with a few themes built in:
Black (default) - White - League - Sky - Beige - Simple
Serif - Blood - Night - Moon - Solarized

Slide Backgrounds

Set data-background="#dddddd" on a slide to change the background color. All CSS color formats are supported.

Down arrow

Image Backgrounds

<section data-background="image.png">

Tiled Backgrounds

<section data-background="image.png" data-background-repeat="repeat" data-background-size="100px">

Video Background

<section data-background-iframe="https://www.youtube.com/embed/ZXsQAXx_ao0" data-autoplay data-background-color="#000000">

Embedded Video

... and GIFs

<section data-background="http://i.giphy.com/90F8aUepslB84.gif">

Background Transitions

Different background transitions are available via the backgroundTransition option. This one's called "zoom".

Reveal.configure({ backgroundTransition: 'zoom' })

Background Transitions

You can override background transitions per-slide.

<section data-background-transition="zoom">

Pretty Code


import numpy as np
from matplotlib import pyplot

x = np.arange(10)
y = x**2

pyplot.plot(x, y)
pyplot.title('$x vs x^2$')
pyplot.xlabel('$x$')
pyplot.ylabel('$x^2$')
					

Code syntax highlighting courtesy of highlight.js.

Intergalactic Interconnections

You can link between slides internally, like this.

Two columns, no problems...

Numbered lists
  1. Coffee
  2. Tea
  3. Milk
Bullet lists
  • First Thing
  • Second Thing
  • Third Thing
## Tablular Tables |Item |Value |Qty. | |:--------|:----:|:---:| |Apples |$1.00 |7 | |Lemonade |$2.00 |18 | |Bread |$3.00 |2 |

Clever Quotes

These guys come in two forms, inline: “The nice thing about standards is that there are so many to choose from” and block:

“For years there has been a theory that millions of monkeys typing at random on millions of typewriters would reproduce the entire works of Shakespeare. The Internet has proven this theory to be untrue.”

Speaker View

There's a speaker view. It includes a timer, preview of the upcoming slide as well as your speaker notes.

Press the S key to try it out.

Take a Moment

Press B or . on your keyboard to pause the presentation. This is helpful when you're on stage and want to take distracting slides off the screen.

JavaScript and State Events

Additionally custom events can be triggered on a per slide basis by binding to the data-state name.

For example, by setting up an event listener on slide trasitions we can turn the university logo on/off.

The following script is placed at the end of the file:


Reveal.addEventListener('slidechanged', function(event) {
    if (event.indexh == 25 && event.indexv == 1) {
        document.getElementById("unilogo").style = "visibility: hidden;";
    }
    else {
        document.getElementById("unilogo").style = "visibility: visible;";
    }
});
                        

Third-party Plugins

  • anything: a plugin for adding plots, charts, animated SVGs, or anything else inside an HTML object using a JSON string and a javascript function (Demo)
  • audio-slideshow: a plugin for easy audio playback and recording (Demo)
  • chalkboard: A plugin adding a chalkboard (Demo)
  • notell: Control reveal.js remotely from another browser tab or device

Software

  • slides.com Visual editor for reveal.js, create presentations without knowing how to code.
  • runnable.com Live editable example of the source code.
  • prez Generate Reveal.js slideshows from a set of markdowns.
  • uncloak Reveal.js theme editor to tweak colors and font styles in a live GUI.

Many more at Reveal.js - Plugins, Tools and Hardware

THE END

Thank You!
Now onto the fun part!