Sunday 2 March 2014

XKCD-style beamer presentation (LaTeX)

Last December, I had a short presentation to do, not necessarily too formal, so I decided to have a go at the different XKCDify codes lying around the web to make a more original LaTeX beamer presentation.

It seems that a version of the code is now shipped with Matplotlib, with a basic example here, and the whole galery of Matplotlib examples turned into XKCD plots there.

I did not notice any official code back in December, from what I understood, the idea originated on the Matplotlib users mailing-list from Damon McDougall, followed by a blog post by Jake Vanderplas. But the code I finally used is from Johannes Buchner, with some hard-coded parameterisation. To simulate hand drawn lines with Tikz, I used the LaTex code from percusse.

For the font, I recommand the LaTeX font catalogue to avoid any installation trouble, but in the end, I used the script from Holger Widmann to install Humor-Sans.ttf, which can be downloaded from several places.

Lastly, some LaTeX code to use the font:
%% use xkcd font
%% Note: that's a font with no bold or italic...
\usepackage[T1]{fontenc}
\definecolor{xkcd_color}{rgb}{.376,.435,.533}
\usecolortheme[named=xkcd_color]{structure}
\renewcommand{\familydefault}{xkcd}

and some page layout changes for the Boadilla theme:
%% do not use any \useoutertheme{}

%% disable navigation symbols
\setbeamertemplate{navigation symbols}{}

%% center slide titles
\setbeamertemplate{frametitle}[default][center]

%% customise the footline: only slide numbers
\setbeamertemplate{footline}{
\begin{beamercolorbox}[ht=2.5ex,dp=1.125ex,
      leftskip=.3cm,rightskip=.3cm plus1fil]{}
       \hfill    \small \insertframenumber/\inserttotalframenumber%
    \end{beamercolorbox}%
}

and here are the slides:


Automated segmentation and motion correction of the fetal brain


Regarding the content of the slides, a paper is under review, so more information about it will be presented in due time.

3 comments:

  1. Amazing!
    Can you share tex code (most interesting 3rd slide)?

    Thank you so much !

    ReplyDelete
  2. Here it is: https://github.com/kevin-keraudren/xkcd-beamer

    ReplyDelete
  3. is there a new version of the tex code? and/or other requirements to use it?
    I'm trying to use your code, but it seems there are some problems.

    All the best.

    --Ambrosio T. (atorresgalvis@gmail.com)

    ReplyDelete