(or emacs irrelevant)

Mmm... minty

The backstory

In one of the earlier posts, I was discussing the implementation of an Emacs Lisp lexer for Pygments. Here, I'll show how to install the update and get nicely highlighted code in a pdf via the minted LaTeX package.

The install

Assuming that you are on a Debian-related system:

sudo apt-get install mercurial
mkdir ~/git && cd ~/git
hg clone https://bitbucket.org/abo-abo/pygments-main
cd pygments-main
make mapfiles
sudo python setup.py install

And, of course, I'm assuming that you already have TeX Live installed. I'm not too sophisticated about it, so I just install everything:

sudo apt-get install texlive-full

The result

So here I took some code from a previous post and copy-pasted it into minty.org file. And here's the result of the PDF export (C-c C-e lo): minty.pdf.

The red tape

org-mode had trouble exporting on my laptop until I did this:

cd /usr/bin/
sudo ln -s /usr/local/texlive/2013/bin/x86_64-linux/pdflatex

Also be mindful of the -shell-escape flag to pdflatex:

(setq org-latex-pdf-process
      '("pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"
        "pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"
        "pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"))