Quickstart

Generate HTML with external CSS definition:
highlight -i main.cpp -o main.cpp.html
highlight < main.cpp > main.cpp.html -Sc

You will find the HTML file and a file highlight.css in the working directory.
If you use IO redirection, you must define the syntax type with --syntax (-S).

Generate HTML with embedded CSS definition and line numbers:
highlight -i main.cpp -o main.cpp.html --include-style --linenumbers
Generate HTML using "ANSI" source formatting style and "neon" colour theme:
highlight -i main.cpp -o main.cpp.html --format-style ansi --style neon
Generate LaTeX:
highlight --latex -i main.cpp -o main.cpp.tex

Other output formats:
XHTML (--xhtml), TeX (--tex), RTF (--rtf), SVG (--svg), terminal escape sequences (--ansi, --xterm256), XML (--xml).
HTML is the default output format if no other format is specified.

Define font shape and size:
highlight -S ada -X --font-size 12 --font Verdana
highlight -S ada -L --font-size tiny --font sffamily
Define an output directory:
highlight -O some/target/dir/ *.cpp *.h

Type highlight --help for more details.

Back
>