presentations Comments 5 min read

Golang present tool is very handy for creating quick, minimal presentations. Install the package, edit a text file and start serving. Text files are easier to manage than a bloated desktop presentation tool (you know who you are). I can check in my files into git, make quick changes and take notes on the fly - like noting down unanswered questions in the Q & A section of my .slide file.

If you haven’t played with it before, you should. Here some sample presentations created using golang present on the golang talks site.

No doubt that it is a useful tool, but it has some visible limitations - some of which are deal breakers for those who treat their presentation game seriously:

1.The unwanted corner preview of the next slide:

Notice how the next slide is peeking out as highlighted:

slide preview problem

Some may argue that this is a feature. But when I am presenting, I feel that the audience should have their full attention on the current slide. Having a preview of the next slide distracts the audience. At the very least, the preview should be an optional feature - which one should be able to turn off.

2.Lack of progressive disclosure support:

If I want to list 3 bullet points on a slide, I want to show them one by one to the audience, so that I can explain the current point and do some build up for the next point. It is human nature to read everything you show on the screen. This distracts the audience from a deep, philosophical discussion around the first question to a seemingly inconsequential thought on the third one as shown below:

progressive disclosure problem

To summarise the above 2 points in fancy words: avoid cognitive overload.

3.Export to PDF breaks once in a while:

After walking your engaging audience through a refreshing session on - 103 ways to chew your pencil - you certainly want to share the slide deck with them. The preferred way to do so in the golang present world is to print and save as PDF, which ever so often, breaks as follows:

pdf export problem 1

Some points tumble over to the next page, or worse - get stuck half way:

pdf export problem 2

Because golang present exports slides to pdf, I wanted to know if there was an intermediate step where in I could edit them using something like LaTeX.

This is where the very awesome Sebastien Binet came to my rescue. He created present-tex and I chanced upon it through this reddit thread.

All you need to do now is:

$ present-tex my.slide > my.tex
$ pdflatex -shell-escape my.tex

The generatex .tex file uses Beamer which is very useful for creating PDF presentations.

The pdflatex tool is a part of the MacTex distribution on Mac and TexLive on Linux. But it is a huge package - it was around 2.9 GB the last time I checked on a Mac. I searched for a docker container alternative just in case the installation breaks and I don’t want to clean up. Thankfully, another awesome open source contributor - Julian Didier has hosted it here. So the exact steps I follow are:

# convert .slide to .tex
$ cd $host_slides_folder
$ present-tex my.slide > my.tex

# build the docker image
$ cd $docker-pdflatex
$ docker build -t pdflatex .

# run the container
$ docker run -d -it -v $host_slides_folder:/var/tmp --name pdflatex pdflatex

# attach bash to the container named pdflatex
$ docker exec -it pdflatex bash
$ cd /var/tmp/

# Generate the pdf from tex file in the current directory
$ pdflatex -interaction=nonstopmode -halt-on-error \
-shell-escape -output-directory  . my.tex  

This does all the hard work and gives me a PDF that just works.

  1. Here is a sample.slide file
  2. This is a sample.tex generated from sample.slide using present-tex
  3. This is a sample.pdf generated from sample.tex using docker-pdflatex

I made some minor styling changes to sample.tex (e.g. making standalone links as bullet points, image size = slide width) and created sample-updated.tex, from which I generated sample-updated.pdf, which reads a little better.

Generating .pdf from .tex instead of .slide solves:

  1. The unwanted corner preview of the next slide: - a PDF document can be zoomed in and you can choose to only display the current slide.

  2. Export to PDF breaks once in a while problem: - because I am getting a full fledged PDF document so there isn’t a need to export it.

But one problem - Lack of progressive disclosure support is still there. This can be easily solved using the effects feature of Beamer. Check out this tex.stackexchange thread to know more.

An example document:

\documentclass{beamer}
\setbeamercovered{invisible}
\begin{document}
  \begin{frame}
    \frametitle{Who let the dogs out?}
    \begin{itemize}[<+->]
        \item Who?
        \item Who?
        \item Who?
        \item Who?
    \end{itemize}
  \end{frame}
\end{document}

Converting this .tex into .pdf generates a PDF which creates the following effect as I move from one slide to the next:

progressive disclosure dry violation

That’s about it. Beamer seems very accessible and I will learn more about it.

Hope you found this post useful. Please leave your feedback and comments below.

Share this post

Comments