Tuesday, February 9, 2010

Debian/Ubuntu: highlight and publish source codes

The tool is called - "highlight"

apt-get install highlight
man highlight
Perfect for publishing, integrating source-codes in tex and on websites. I like the following for my codes:

highlight --pretty-symbols --inline-css -I -l _FILE_NAME_ --style $ide -V > tmp; firefox tmp &
In firefox, one can do "View Page Source" and copy&paste.