.TH highlight 1 "2023-05-11" "Andre Simon" "user documentation" .SH NAME Highlight - a universal sourcecode to formatted text converter .SH SYNOPSIS .B highlight [\fIOPTIONS\fR]... [\fIFILES\fR]... .SH DESCRIPTION .B Highlight converts sourcecode to HTML, XHTML, RTF, ODT, LaTeX, TeX, BBCode, Pango markup, SVG, XTERM or ANSI escape sequences. There are several colour themes available. .B Highlight recognizes keywords, numbers, strings, comments, symbols and preprocessor directives. It supports about 180 programming languages, which are defined in Lua scripts. .PP It's easily possible to enhance highlight's database of programming languages and colour themes. See the README file for details. .SH GENERAL OPTIONS .IP "\fB-B\fR, \fB--batch-recursive\fR=<\fIwildcard\fR>" convert all files matching the wildcard (uses recursive search) .IP "\fB-D\fR, \fB--data-dir\fR=<\fIpath\fR>" set path to highlight data directory .IP "\fB--config-file\fR=<\fIfile\fR>" set path to a lang or theme file .IP "\fB-h\fR, \fB--help\fR[=\fItopic\fR]" print this help or a topic description = [syntax, theme, plugin, config] .IP "\fB-i\fR, \fB--input\fR=<\fIfile\fR>" name of input file .IP "\fB-o\fR, \fB--output\fR=<\fIfile\fR>" name of output file .IP "\fB-d\fR, \fB--outdir\fR=<\fIoutput directory\fR>" name of output directory .IP "\fB-P\fR, \fB--progress\fR" print progress bar in batch mode .IP "\fB-S\fR, \fB--syntax\fR=<\fItype\fR|\fIpath\fR>" set type of source code, necessary if input file suffix is missing. The syntax may also be defined as path of the language file. .IP "\fB--syntax-by-name\fR=<\fIname\fR>" specify type of source code by given name. Will not read a file of this name, useful for stdin and to determine the syntax of the file before piping its content to highlight. This option overrides --syntax. .IP "\fB--syntax-supported\fR" test if the given syntax can be loaded and print the result (assumes -S or --syntax-by-name) .IP "\fB-v\fR, \fB--verbose\fR" print debug info to stderr; repeat to show more information .IP "\fB-q\fR, \fB--quiet\fR" suppress progress info in batch mode .IP "\fB--force\fR[=\fIsyntax\fR]" generate output if input syntax is unknown. The fallback syntax may be set here, Plain Text is default. .IP "\fB--list-scripts\fR=<\fItype\fR>" list installed scripts = [langs, themes, plugins] .IP "\fB--list-cat\fR=<\fIcategories\fR>" filter the scripts by the given categories (example: --list-cat='source;script') .IP "\fB--max-size\fR=<\fIsize\fR>" set maximum input file size (examples: 512M, 1G; default: 256M) .IP "\fB--plug-in\fR=<\fIscript\fR>" execute Lua plug-in script; repeat option to apply multiple plug-ins .IP "\fB--plug-in-param\fR" set plug-in input parameter. This might be an input file name (ie. 'tags'). .IP "\fB--print-config\fR" print path configuration .IP "\fB--print-style\fR" print stylesheet only (see --style-outfile) .IP "\fB--skip\fR=<\fIlist\fR>" ignore listed unknown file types (example: --skip='bak;c~;h~') .IP "\fB--stdout\fR" output to stdout (batch mode, --print-style) .IP "\fB--validate-input\fR" test if input is a valid text file .IP "\fB--service-mode\fR" run in service mode, not stopping until signaled .IP "\fB--version\fR" print version and copyright info .SH OUTPUT FORMATTING OPTIONS .IP "\fB-O\fR, \fB--out-format\fR=<\fIformat\fR>" output file in given format =[html, xhtml, latex, tex, rtf, odt, ansi, xterm256, truecolor, bbcode, pango, svg] .IP "\fB-c\fR, \fB--style-outfile\fR=<\fIfile\fR>" name of style definition file .IP "\fB-T\fR, \fB--doc-title\fR" document title .IP "\fB-e\fR, \fB--style-infile\fR=<\fIfile\fR>" name of file to be included in style-outfile .IP "\fB-f\fR, \fB--fragment\fR" omit header and footer of the output document (see --keep-injections) .IP "\fB-F\fR, \fB--reformat\fR=<\fIstyle\fR>" reformat output in given style.