highlight
converts source code to formatted output with syntax highlighting
TLDR
SYNOPSIS
highlight [options] [files...]
DESCRIPTION
highlight converts source code to formatted output with syntax highlighting. It supports over 250 programming and markup languages and can output to HTML, XHTML, RTF, ODT, TeX, LaTeX, SVG, Pango, BBCode, and ANSI/terminal escape sequences (including 256-color and truecolor).The tool is useful for documentation, presentations, and generating printable source listings with proper syntax coloring.
PARAMETERS
-O, --out-format format
Output format: html, xhtml, latex, tex, rtf, odt, ansi, xterm256, truecolor, bbcode, pango, svg.-S, --syntax lang
Specify source language, needed if it can't be guessed from the file suffix.-s, --style name
Color theme (add a "base16/" prefix to use a Base16 theme).-l, --line-numbers
Include line numbers.-i, --input file
Input file.-o, --output file
Output file.--list-scripts type
List langs, themes, or plugins.-f, --fragment
Omit document headers.--inline-css
Embed CSS in HTML.-a, --anchors
Attach anchors to line numbers (HTML only).-B, --batch-recursive wildcard
Convert all files matching the wildcard, recursively.--stdout
In batch mode, write output to stdout instead of files.-t, --replace-tabs num
Replace tabs with the given number of spaces.-u, --encoding enc
Set output encoding to match the input file's encoding.--config-file file
Path to a custom language definition or theme file.
INSTALL
CAVEATS
Language detection may need hints. Theme appearance varies by output format. Some languages have limited support.
HISTORY
highlight was created by Andre Simon as a universal source code highlighter. It has been actively developed since 2002, continuously adding language support and output formats.
SEE ALSO
pygmentize(1), bat(1), source-highlight(1), vim(1)
