LOWDOWN(1)

NAME
lowdown - simple markdown translator

SYNOPSIS
lowdown [-sv] [-D feature] [-d feature] [-E feature] [-e feature] [-o file] [-T mode] [file]
lowdown [-v] [-o file] [-X keyword] [file]

DESCRIPTION
The lowdown utility translates from markdown into HTML5 in XML mode (the default) or roff using the -ms or -man macro packages. If not given a file, or if file is “-”, lowdown reads from standard input. The results are written to standard output. Its arguments are as follows:

-D feature
    Disable the given feature (see Output features). See -E. You can specify this multiple times for different features.

-d feature
    Disable the given feature (see Input features). See -e. You can specify this multiple times for different features.

-E feature
    Enable the given feature (see Output features). See -D. You can specify this multiple times for different features.

-e feature
    Enable the given feature (see Input features). See -d. You can specify this multiple times for different features.

-o file
    Send output to file unless it's “-”, in which case fall back to the default of standard output.

-s  Standalone mode. This emits a minimal HTML5 or roff document surrounding the output. You will probably need to hand-edit it. If you have the metadata feature enabled (the default), the title for the document is pulled from the metadata key “title” and the date from the “rcsdate” (in RCS $Date: 2017/03/09 10:20:43 $ format, see rcs(1)) or “date” (ISO-8601 YYYY-MM-DD or YYYY/MM/DD) metadata keys. Else these are set to “Untitled article” and the current date.

-T mode
    The output mode. This may be html for HTML5 output, ms for roff output using the classic (i.e., no-extension) -ms package and needing table support, or man for roff ouput using the classic -man package.

-v  Verbose mode. Prints out warnings regarding Markdown syntax conformity.

-X keyword
    Instead of converting the file, extract the given metadata keyword and exit. Only the -v and -o flags are recognised.

For best results, use the -T html output, as it includes graphics and equations. The ms and man modes will elide graphics and equations.

By default, lowdown enables the autolink, fenced, footnotes, metadata, strike, super, and tables features. You can see a full list of features in Input features. The html-skiphtml, nroff-groff, nroff-skiphtml, and smarty output features are enabled by default. See Output features for a full list.

  Input features
There are a number of Markdown (and Markdown extension) features supported by lowdown. These can be enabled with -e and disabled with -d. They are as follows:

autolink
    Autolink http, https, ftp, mailto, and relative links or link fragments.

fenced
    Allow for GFM fenced (language-specific) code blocks.

footnotes
    MMD style footnotes. This only supports one-liner footnotes on the same line as the footnote definition (not the in-line referent).

hilite
    Highlight. Do not use this option.

math
    Recognise single-dollar math mode.

mathexp
    Recognise double-dollar math mode. This only works if math has also been enabled.

metadata
    Accept MMD metadata. For the first paragraph to count as meta-data, the first line must have a colon in it. Otherwise it's considered a regular paragraph.

nocodeind
    Do not indent code blocks.

nointem
    Disable emphasis with links.

sphd
    Require a space between hash marks and header.

strike
    Strikethrough support.

super
    Allow for super-scripts. This accepts foo^bar, which puts the parts following the caret until whitespace in superscripts; or foo^(bar), which puts only the parts in parenthesis.

tables
    Allow for GFM tables.

The parser also accepts link titles (quoted alongside the link address) and image dimensions (=WxH or =Wx). Both may also be specified, in any order. For example, ![alt](url title =23x24). These are fairly standard Markdown extensions.

  Output features
lowdown allows for limited control over output features. These can be enabled with -E and disabled with -D. They are as follows, prefixed by “html” or “nroff” depending upon the output mode:

html-escape
    Leaves in-line HTML in its source form as if it were opaque text.

html-hardwrap
    Retain line-breaks within paragraphs.

html-skiphtml
    Do not render in-document HTML at all. Note that html-escape takes priority if both are specified. Text within HTML elements remains.

nroff-groff
    Use GNU extensions (i.e., for groff(1)) when rendering output. You'll need to include -m pdfmark when invoking groff(1) for formatting links.

nroff-hardwrap
    Retain line-breaks within paragraphs.

nroff-skiphtml
    Do not render in-document HTML at all. Text within HTML elements remains.

smarty
    Don't use “smartypants” formatting.

EXAMPLE
To emit a standalone HTML5 document from a file foo.md:

    lowdown -s foo.md > foo.html

To do the same but using groff(1) to format as a PS file:

    lowdown -s -Tms foo.md | \
      groff -t -ms -mpdfmark > foo.ps

Note the -t: since lowdown may emit tables, you'll need it. Moreover, the -m pdfmark is for the groff extensions. Alternatively, using only mandoc(1):

    lowdown -sT man foo.md | mandoc -Tps > foo.ps

If your document uses UTF-8 without the byte-order mark, you may need to specifically set the encoding in either formatter:

    lowdown -sT man foo.md | mandoc -Tps -Kutf-8 > foo.ps

    lowdown -sT ms foo.md | \
      groff -k -Dutf8 -t -ms -mpdfmark > foo.ps

To extract the title from a file's metadata:

    lowdown -X title foo.md

EXIT STATUS

If the -X flag is used, lowdown exits with an error if the given keyword is not found.

STANDARDS
lowdown implements the classic Markdown specification along with some extensions. See Input features and Output features for a list.

AUTHORS
The lowdown utility was forked by Kristaps Dzonsons, kristaps@bsd.lv, from hoedown: https://github.com/hoedown/hoedown.