OnWorks favicon

highlight - Online in the Cloud

Run highlight in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command highlight that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator



Highlight - a universal sourcecode to formatted text converter


highlight [OPTIONS]... [FILES]...


Highlight converts sourcecode to HTML, XHTML, RTF, ODT, LaTeX, TeX, BBCode, SVG, XTERM or
ANSI escape sequences. There are several colour themes available. Highlight recognizes
keywords, numbers, strings, comments, symbols and preprocessor directives. It supports
about 160 programming languages, which are defined in Lua scripts.

It's easily possible to enhance highlight's database of programming languages and colour
themes. See the README file for details.

General options

-B, --batch-recursive=<wildcard>
convert all files matching the wildcard (uses recursive search)

-D, --data-dir=<path>
set path to highlight data directory (deprecated)

set path to a lang or theme file

-h, --help
print this help

-i, --input=<file>
name of input file

-o, --output=<file>
name of output file

-d, --outdir=<output directory>
name of output directory

-P, --progress
print progress bar in batch mode

-S, --syntax=<type>
set type of source code, necessary if input file suffix is missing

-v, --verbose
print debug info to stderr

-p, --list-langs
list installed language definitions (deprecated)

-q, --quiet
supress progress info in batch mode

-w, --list-themes
list installed themes (deprecated)

generate output if input syntax is unknown

list installed scripts <type>=[langs, themes, plugins]

execute Lua plug-in script; repeat option to apply multiple plug-ins

set input file for a plug-in (e.g. 'tags')

print path configuration

print stylesheet only (see --style-outfile)

ignore listed unknown file types (Example: --skip='bak;c~;h~')

define nested language which starts input without opening delimiter

test if input is a valid text file

print version and copyright info

Output formatting options

-O, --out-format=<format>
output file in given format <format>=[html, xhtml, latex, tex, rtf, odt, ansi,
xterm256, bbcode, svg]

-c, --style-outfile=<file>
name of style definition file or output to stdout, if "stdout" is given as file

-T, --doc-title
document title

-e, --style-infile=<file>
name of file to be included in style-outfile

-f, --fragment
omit header and footer of the output document

-F, --reformat=<style>
reformat output in given style. <style>=[allman, banner, gnu, java, kr, linux,
stroustrup, whitesmith, google, pico, lisp]

-I, --include-style
include style definition in output

-J, --line-length=<num>
line length before wrapping (see -W, -V)

-j, --line-number-length=<num>
line number length incl. left padding

-k, --font=<font>
set font (specific to output format)

-K, --font-size=<num?>
set font size (specific to output format)

-l, --line-numbers
print line numbers in output file

-m, --line-number-start=<cnt>
start line numbering with cnt (assumes -l)

-s, --style=<style name>
set highlighting style (see --list-themes)

-t --replace-tabs=<num>
replace tabs by num spaces

-u, --encoding=<enc>
set output encoding which matches input file encoding; omit encoding information if
set to "NONE"

-V, --wrap-simple
wrap long lines without indenting function parameters and statements

-W, --wrap
wrap long lines (use with caution)

-z, --zeroes
fill leading space of line numbers with zeroes

output all keywords in given case if language is not case sensitive

set CR as end-of-line delimiter (MacOS 9)

omit trailing newline

omit line numbers of wrapped lines (assumes -l)


-a, --anchors
attach anchors to line numbers (HTML only)

-y, --anchor-prefix=<str>
set anchor name prefix

-N, --anchor-filename
use input file name as anchor name

-C, --print-index
print index file with links to all output files

-n, --ordered-list
print lines as ordered list items

set CSS class name prefix; omit class name if set to "NONE"

output CSS within each tag (verbose output)

enclose fragmented output with pre tag (assumes -f)


-b, --babel
disable Babel package shorthands

-r, --replace-quotes
replace double quotes by \dq

improve appearance of brackets and other symbols


-x, --page-size=<size>
set page size, <size>=[a3, a4, a5, b4, b5, b6, letter]

include character stylesheets


set image height (units allowed)

set image size (see --height)


--doc create stand alone document

cancel the --doc option

the external style sheet filename

source language

-t, --tab=INT
specify tab length

-n, --line-number[=0]
number all output lines, optional padding

number all output lines and generate an anchor, made of the specified prefix
p + the line number (default='line')

output directory

if no language definition is found for the input, it is simply copied to the output

If no in- or output files are specified, stdin and stdout will be used for in- or output.
HTML will be generated unless an other output format is given. Style definitions are
stored in highlight.css (HTML, XHTML, SVG) or highlight.sty (LaTeX, TeX) if neither -c nor
-I is given. Reformatting code (-F) will only work with C, C++, C# and Java input files.

Use highlight online using onworks.net services

Free Servers & Workstations

Download Windows & Linux apps

  • 1
    AstrOrz Player is a free media player
    software, part based on WMP and VLC. The
    player is in a minimalist style, with
    more than ten theme colors, and can also
    Download AstrOrzPlayer
  • 2
    Kodi Movistar+ TV es un ADDON para XBMC/
    Kodi que permite disponer de un
    decodificador de los servicios IPTV de
    Movistar integrado en uno de los
    mediacenters ma...
    Download movistartv
  • 3
    Code::Blocks is a free, open-source,
    cross-platform C, C++ and Fortran IDE
    built to meet the most demanding needs
    of its users. It is designed to be very
    Download Code::Blocks
  • 4
    Amidst or Advanced Minecraft Interface
    and Data/Structure Tracking is a tool to
    display an overview of a Minecraft
    world, without actually creating it. It
    can ...
    Download Amidst
  • 5
    MSYS2 is a collection of tools and
    libraries providing you with an
    easy-to-use environment for building,
    installing and running native Windows
    software. It con...
    Download MSYS2
  • 6
    libjpeg-turbo is a JPEG image codec
    that uses SIMD instructions (MMX, SSE2,
    NEON, AltiVec) to accelerate baseline
    JPEG compression and decompression on
    x86, x8...
    Download libjpeg-turbo
  • 7
    Xtreme Download Manager
    Xtreme Download Manager
    The project has a new home now:
    https://xtremedownloadmanager.com/ For
    https://github.com/subhra74/xdm Xtreme
    Download Manager is a powerful tool t...
    Download Xtreme Download Manager
  • More »

Linux commands