Template for code highlighting with minted in LaTeX beamerPosted: October 26, 2013
Syntax highlighting can be achieved in LaTeX via listings or more recently with minted. The latter package uses Pygments to create beautiful code highlighting and includes fantastic additional features such as line numbering.
Minted’s compatibility with the Latex beamer class, however, is restricted and some workarounds (as laid out by Tristan Ravitch in his blog post) are needed to assure full functionality of both the beamer class and minted.
Here’s a template I created for anyone who wants to present code with the beamer class and the minted package. Slides created in such way can then, for example, look like this:
Get the TeX source code!