Codex is a
program designed to help in the publishing of source
code, for print or web publishing. It can export source
code to HTML, RTF or TeX format, for publication, with
fully customized syntax highlighting and styling. It can
export directly to an FTP or to your local drive. It has
an auto export mode and supports over 50 languages and
file types.