LaTeXing python programs

José Matos jaomatos at gmail.com
Wed May 20 14:40:20 EDT 2009


On Wednesday 20 May 2009 18:43:21 Edward Grefenstette wrote:
> Yes, I am aware that this is more of a LaTeX question than a python
> question, but I thought users here might be most likely to offer a
> suitable recommendation.
>
> I'm typing up my master's  thesis and will be including some of the
> code used for my project in an appendix. The question is thus: is
> there a LaTeX package out there that works well for presenting python
> code?
>
> verbatim is a bit ugly and doesn't wrap code, and while there are a
> plethora of code colouring packages out there, they are not all easy
> to use, so I thought I might ask what the popular options in the
> community are.

Use the listings package.
It has a python as one of defined languages and has lots of other options.
http://www.ctan.org/tex-archive/macros/latex/contrib/listings/

> Cheers,
> Edward

-- 
José Abílio



More information about the Python-list mailing list