Installing minted, syntax highlight for LaTeX

Minted provides syntax highligh for LaTeX, I had to install it a couple times, so I better keep the notes of how to do it:

Basides LaTeX modules, minted depends upon pygments, instalable on Debian-based distros with:

apt-get install python-pygments

or using PIP

pip install Pygments

In order to install minted itself we've got to create a ~/texmf/tex/latex/ directorio, there we'll download the source code

git clone https://github.com/gpoore/minted/

after this, enter the source sub­di­rec­to­ry and run

tex mintex.ins

Minted is already installed, but it also depends on the following packages:

  • keyval
  • fancyvrb
  • xcolor
  • float
  • ifthen
  • calc
  • ifplatform

Debian-based dis­tri­b­u­tions latex packages seem to include almos everyone, only lasting ifplatform, to install it we've got to download ifplatform.dtx and ifplatform.ins from the CTAN, move the files to a ~/texmf/tex/latex/ sub­di­rec­to­ry (like ifplatform) and like minted run:

tex ifplatform.ins

To wrap up, run

texhash ~/texmf/

And it's done :)