$ sudo easy_install Pygments $ cat > 1.py import numpy print numpy.version ^D $ pygmentize -f html -O full -o 1.html 1.py
Here is a short example of rendering R and Python code:
The source file is here: test_minted.tex. To compile, just run
$ xelatex -shell-escape test_minted.tex
What I like is:
- Its syntax looks like that for the listings package, so it’s easier to switch to it.
- It has good unicode support.
- It offer full-support for R, and more esoteric language that I like (e.g., Asymptote), but try
pygmentize -L lexersat the shell prompt.
I seem to remember having tried the highlight program, but I cannot find any trace of it on my old computer.