The following procedure has been tested on OS X 10.9.2, MacTex-2013 and TextMate 1.5.11.
Install minted
and its dependency (pygmentize
)
sudo easy_install pip
sudo pip2.7 install Pygmentize
sudo tlmgr install minted
In TextMate go to Bundles --> LatTeX --> Preferences...
and fill the Option
field with the following: -shell-escape
.
Declare the package in your tex
file:
\usepackage{minted}
Now you can do:
\begin{minted}{java}
response.setContentType("text/plain");
PrintWriter out = response.getWriter();
out.println("Hello");
out.close();
\end{minted}