Solarized LaTeX Listings

October 04, 2014

Out of the box, LaTeX listings are pretty bad. With a bit of work, you can ascribe some colors to the code, but you’re still stuck with choosing a theme. Given that I recently just switched to the Solarized colorscheme in Vim and iTerm2, I made a LaTeX package that styles code listings with the predefined Solarized light colors.

Source

The source for this theme is on GitHub, and the README has pretty good documentation. Here’s an example of the final result:

After you install them in the right place, you can include \usepackage{solarized-light} to turn source code listings light (as in above), \usepackage{solarized-dark} to have listings styled with the dark Solarized theme, and just \usepackage{solarized} to have access to the raw Solarized color codes (see the source for their names).

Once you’ve done this, you just have to include your code in your LaTeX file using the listings packages. You might want to check out the LaTeX wiki for more information on how to get started quickly with code listings, or the official documentation for a more comprehensive reference.

ABTs in Haskell

I’ve been learning and using Haskell on-and-off for the past couple of years. One of my early complaints was that I couldn’t find a good library for working with variables and binding that used locally nameless terms. Recently though, I found unbound-generics, which checks all my previously unfilled boxes. Continue reading

Variables and Binding

Published on October 28, 2017

System Fω and Parameterization

Published on September 27, 2017