tags:

views:

5579

answers:

3
+9  A: 

The listings package is quite nice and very flexible (e.g. different sizes for comments and code).

Fabian Steeg
A: 

For simple document, I sometimes use verbatim, but listing is nice for big chunk of code.

claferri
+3  A: 

After some lengthy googling, it turns out that lstlisting is able to format code nicely, but it requires a lot of tweaking.

Wikibooks has a good example for the parameters you can tweak.

(Sorry to answer my own question ! )

Ed Woodcock