A good solution I'm using is to print from TextMate with help vim, which gives you the result with a syntactically allocated and string number (or, nevertheless, you are setting it up). In addition to vimthis, it is required ps2pdfbut they are easy to install with macports, etc.
The only limitation is to save the file first.
, , TextMate.