- Highlight - Convert Source Code to Formatted Text with Syntax Highlighting

Highlight converts source code to formatted text with syntax highlighting.

  * Coloured output in HTML, XHTML, RTF, TeX, LaTeX, SVG, BBCode and XML format
  * Supports 150+ programming languages
  * Includes 40 colour themes
  * Recognizes nested languages
  * CLI, GUI and Lib builds available
  * Platform independent

Installation:
OpenSuSe user can install Highlight using "1-click" installer - here

Using Highlight:
The following commands write the content of hello.c to hello.html:
highlight -o hello.html -i hello.c
highlight -o hello.html hello.c
highlight -o hello.html --syntax c < hello.c
highlight --syntax c < hello.c > hello.html
Apart from hello.html, a file highlight.css is generated in the current working directory.

Following command converts all *.cpp files in the current directory and its subdirectories to xhtml files, and stores the output in /home/you/html_code.
highlight -X  --batch-recursive '*.cpp' --outdir /home/you/html_code/
Following command converts all *.cpp files in the current directory and its sub- directories to xhtml files, and stores the output in /home/you/html_code.
highlight -L  * --outdir /home/you/latex_code/
You can generate a style file without parsing any source code.
highlight --fragment --style-outfile hilite.css
Following command prints only the CSS information to stdout (style: Seashell).
highlight -c stdout -S seashell


source:http://linuxpoison.blogspot.com/2010/04/135781677513455.html