Einar's blog

Interactive presentations

I often present new material for my students in class. I teach programming and information technology at a vocational school, so I often need to run code as examples of what I am presenting about. Sometimes, I also want to tweak the code slightly and rerun it within the flow of my presentation. Another thing I like to do is to make my presentations interactive. I might ask my students something and write down their answers in my presentation or I might hand out individual tasks, collect the answers and use the presentation to share the results with everyone on the screen. (We have large 4k touch screens that also have whiteboard functionality in every classroom.)

We have MS365 (formerly known as MS Office) at the school and most of my colleagues use PowerPoint for their presentations. But PowerPoint cannot be used for interactive presentations. Either you create the presentation or you present it. There is no mode for presenting it while adding text or editing code blocks. It is also unable to run code when I am presenting. The workaround would be to run the code in some other tool like the python shell, node.js, the developer tools in a web browser or whatever REPL or compiler is available for the language you present about and take a screenshot and put that into your presentation. But I want to run the code after I have explained the concepts I am trying to get through so my students can see that it actually works the way I told them. I also like to tweak the code if they need an additional explanation or to try out different approaches (for instance in JavaScript: myObject["key"] or myObject.key) PowerPoint has the same problems with interactivity as LibreOffice Present, Google Docs whatever it is called this week, Apple Keynote and all the other standard presentation software. They are all unsuitable for presentations if there is any kind of interactivity. And when you are in a classroom, you want interactivity to keep your audience engaged.

Emacs Org mode is a tool for outlining ideas (and a lot of other stuff like calendaring, todos and project planning) and there is support for inline images and code blocks in almost any programming language that you can run when you want (or tangle out to a separate code file a la literate programming which is how I make my literate Emacs config, but that is another blog post for another day). It is not presentation software, but Emacs is extendable and hackable enough that it can be made to work as presentation software. Ric Lister has made an Emacs package called org-present that does exactly what I need. I make my presentation in org mode as an org file (org markup is similar to markdown), add the images and code blocks directly within the text with the markup. When I am in class, I just run org-present with M-x. (Alt-x or Meta-x as it is called in Emacs for historical reasons lets you run any interactive function). Each top level heading becomes a slide. I can write directly into the slides while I present them since they are just text files in org markup displayed with larger font sizes and nicer headlines etc, which makes it possible to do things like ask my students something and write down their answers. I can also run code blocks by hitting Ctrl-C Ctrl-C with the pointer above the code block and the results pop up underneath in a separate Results block within the text of my presentation. Another advantage is that if I alt-tab into another program like Firefox, my presentation within Emacs does not switch out of presentation mode like most presentation software like PowerPoint tends to do. I can come back to my presentation after showing a Youtube video with Firefox and continue where I left off.

Since org-present allows interactivity, running code blocks and switching back and forth from other software, I tend to use presentations as outlines for whole classes now, not just for the parts that includes a traditional presentation where I present some new information, but I also put in headings for tasks that I put on our learning platform (it's learning). When I get to the tasks, I can alt-tab to Firefox and show the students where they are and tell them how to work on them, and then after we have spent whatever time I set aside for the tasks, I can continue with my presentation and maybe give them some new information from the bullet points, pictures or code blocks in the presentation or I can get their feedback on what they learned from the tasks and write that into the presentation.

After class, I export the org file of the presentation to a PDF and put it on our learning platform to make it easy for students not present to see what was happening or for later review before a test or an exam. I have set up org-present to work the way I like with a bit of code in my Emacs config. I turn off the menu bar, turn on display of inline images and sets a standard width that usually works (that I can easily change with some metadata above an image) and use org-present-big to make everything large. I then hook my configuration into the start of org-present and also have a function that resets my configuration that I hook in when org-present is quit. I highly recommend org-present if you want interactivity within your presentations, especially if you already use Emacs and Org mode.



All content is shared under the terms of the Creative Commons Attribution-ShareAlike license.