Skip to main content

Module roff

Module roff 

Source
Expand description

Roff for the manpages: text escaped as man(7) wants it, and the Markdown of the docs turned into man macros, so a page and its web page share one source.

Prose is one line per paragraph and left to the formatter to fill. Commands and code are unfilled (.EX), so they are never broken or hyphenated and paste as written. Every character outside ASCII is a roff escape, so a page reads the same on a terminal that has no UTF-8.

Structs§

Markdown
Turns a Markdown page into roff.

Enums§

Headings
How a page’s Markdown headings map to man’s.

Functions§

arg
A macro’s argument, quoted: " inside is \(dq.
bold
Bold, for literal input.
example_block
A command shown unfilled and indented: one per line, never broken.
inline
Markdown inline text as roff: code and <kbd> bold, **bold**, *italic*, links as their text (and an absolute link’s URL after it), entities and \| unescaped.
italic
Italic, for something to replace.
line
A text line: escaped already, and guarded against reading as a request.
literal
Something typed: a command, an option, a value. Every - is \-.
plain
Markdown inline text with its formatting dropped: for a heading.
text
Prose, escaped. A - that starts a word (-c, --hive, a lone -) is an option and becomes \-; a hyphen inside a word stays one.
tidy
Drop the paragraph breaks a heading already makes: .PP right after .SH or .SS, which mandoc warns about.