Command-line API

Takes input of a markdown-like document, processes it and typesets it before passing the result to a driver for outputting in some format. Extensions can be used to include arbitrary functionality; device drivers are also extensions.

Examples

em -Tutf8 example.em
em hello

Positional arguments

The following arguments are written anywhere in the call to em (after the program name itself).

file

File to typeset or - to read from stdin.

  • type: string
  • default: ‘-’

Optional arguments

The following are used to modify the behaviour of Emblem, to suit a user’s preferences.

-a extension.param=value, --ext-arg extension.param=value

Pass parameter param with value value to extension ext.

  • type: List

-c style, --class style

Set the output class.

  • type: string
  • default: ‘” DATA_DIR “/article’

-C, --colourise-output

Specify output colourisation, -1 for none, 1 for always, 0 for auto-detect (default is 0).

  • type: int
  • default: 0

-E, --fatal-warnings

Treat warnings as errors.

  • type: flag

-F driver, --from driver

Set the input driver, if none is specified, the emblem parser is used.

  • type: string
  • default: ‘’

-f family, --font-family family

Specify a default font family.

  • type: string
  • default: ‘’

-h, --help

Display this help message and exit.

  • type: help

-M, --max-iters

Max number of typesetting iterations allowed.

  • type: int
  • default: 4

-o stem, --output-to stem

Name of the output file without file-extension. If left unspecified the input file (with its extension removed) is used, otherwise emdoc.

  • type: string
  • default: ‘’

-S size, --font-size size

Specify the default font size.

  • type: double
  • default: 0

-s, --sandbox-level

Restrict access to the system, 0 makes no restrictions, 1 restricts creation of new subprocesses, 2 restricts uses all level 1 restrictions and prevents file system access. Default is 1.

  • type: int
  • default: 1

-T driver, --to driver

Set the output driver, default is html.

  • type: string
  • default: ‘html’

-t, --tab-size

The assumed size of tabs when reading input files.

  • type: int
  • default: 4

-v verbosity, --verbose verbosity

Set output verbosity, 3 outputs everything, 0 suppresses all messages including errors. Default is 1.

  • type: int
  • default: 1

-V, --version

Display version and license information and exit.

  • type: version

-x extension, --extension extension

Specify an extension to load. When used multiple times, the specified extensions are loaded in the order given.

  • type: List