Tuesday, 18 January 2011

lgrind on Mac

lgrind is a pretty-printer and syntax highlighting utility for computer code. You take some computer code, feed it to lgrind, and you get a publishable code (in html, latex, etc.) with formatted and colored syntax. Very useful for including code in presentations and lecture notes.

I tried to install lgrind from ctan on my Mac but couldn't compile the source code without errors. Fortunately, a bit of Googling led me to a set of Mac binaries courtesy of the JHL Development Blog.

The installation is simple:

1. Download and decompress the JHL's binaries
2. Put the executable file lgrind in your bin directory
3. Put the lgrind.sty file in your latex tree (available from ctan)
4. Download the lgrinddef file from ctan and put it where lgrind.sty is
5. Create a symbolic link in /usr/share/ pointing to your latex tree with

ln -s ~/Library/texmf texmf

No comments:

Post a Comment