Skip to main content

C'est la Z

Using Emacs - 11 - Reveal.js presentations

Happy to be back after a couple of weeks.

My wife and son spent some time in San Francisco, Mountain View, and Seattle. The main reason was to see our daughter who's interning out there for the summer but it was also a great opportunity to catch up with over 100 former students. If you're interested in seeing more, I wrote a bit about it here.

I was originally going to start talking about Python development but then saw this post on reddit about reveal.js and using it with org-mode. Since reveal.js with org-mode is my goto presentation tool I thought I'd do a video on that before getting back to "your regularly schedueld program."

The main package you have to use for reveal.js presentations in org-mode is org-reveal. The package to install is ox-reveal. I also installed htmlize for syntax highlighting. Here's the code from our configuration file:

(use-package ox-reveal
:ensure ox-reveal)

(setq org-reveal-root "")
(setq org-reveal-mathjax t)

(use-package htmlize
:ensure t)

The org-reveal-root setq tells your presentation where to find the reveal.js code. In this example, we're getting from the cloud. You can also install it locally.

The org-reveal-mathjax is just so that LaTeX equations will look nice.

I'm hoping the video is pretty self-explanitory and the org-reveal home page is pretty thorough but since the documentation is lagging a bit behind the code and due to some versioning issues, here are a couple of things to watch out for:

  • I made a samples folder where I'll put code for this series that

isn't part of the configurations.

  • I showed :frag (roll-in) as an example of revealing list items

one at a time. Those parens are important and are needed but weren't in earlier versions - this took me far too long to figure out.

  • If you read the docs you'll see that there are many more transitions

and you can mix and match them on a page.

  • You might have to upgrade your emacs packages. If you

list-packages in eamcs it will tell you if you have packages to upgrade. You mark them for upgrading by typing U and then do the upgrade with x. If this doesn't work, you can try getting rid fo the elpa folder and then re-installing.

  • The mazelesson sample presentation shows more features, many that we

haven't covered yet. Check it out but remember that it's for an earlier version of org-reveal.

  • Github pages and rawgit are cool.

Hope you enjoy this. Please add any reveal.js tips and tricks of your own.

Relevant links:

comments powered by Disqus