2021-10-06 21:53:26 +07:00
|
|
|
# highlight
|
|
|
|
|
|
|
|
> Outputs syntax-highlighted source code to a variety of formats.
|
2025-05-09 20:40:35 +03:00
|
|
|
> More information: <http://andre-simon.de/doku/highlight/en/highlight.php>.
|
2021-10-06 21:53:26 +07:00
|
|
|
|
|
|
|
- Produce a complete HTML document from a source code file:
|
|
|
|
|
2025-05-09 20:40:35 +03:00
|
|
|
`highlight {{[-o|--out-format]}} {{html}} {{[-s|--style]}} {{theme_name}} {{[-S|--syntax]}} {{language}} {{path/to/source_code}}`
|
2021-10-06 21:53:26 +07:00
|
|
|
|
|
|
|
- Produce an HTML fragment, suitable for inclusion in a larger document:
|
|
|
|
|
2025-05-09 20:40:35 +03:00
|
|
|
`highlight {{[-o|--out-format]}} {{html}} {{[-f|--fragment]}} {{[-S|--syntax]}} {{language}} {{source_file}}`
|
2021-10-06 21:53:26 +07:00
|
|
|
|
|
|
|
- Inline the CSS styling in every tag:
|
|
|
|
|
2025-05-09 20:40:35 +03:00
|
|
|
`highlight {{[-o|--out-format]}} {{html}} --inline-css {{[-S|--syntax]}} {{language}} {{source_file}}`
|
2021-10-06 21:53:26 +07:00
|
|
|
|
|
|
|
- List all supported languages, themes, or plugins:
|
|
|
|
|
|
|
|
`highlight --list-scripts {{langs|themes|plugins}}`
|
|
|
|
|
|
|
|
- Print a CSS stylesheet for a theme:
|
|
|
|
|
2025-05-09 20:40:35 +03:00
|
|
|
`highlight {{[-o|--out-format]}} {{html}} --print-style {{[-s|--style]}} {{theme_name}} {{[-S|--syntax]}} {{language}}] --stdout`
|