This file describes the Markdown output format generated by the man-to-md filter program.
The first section of the output
will be generated from the input's .TH
line, NAME
section, and SYNOPSIS
section.
This is the output format:
# programName(manSection) - programDescription
Version programVersion, programDate
```
programSyntax
```
- If the
--comment
option is used, the first output line will be a hidden comment. - Comments in the nroff input will be removed.
Markdown does not really support comments, we're using this trick instead:
[//]: # (This file was autogenerated from the man page with 'make README.md')
- The document title is a top-level headline (
#
). - All section titles (
.SH
) get converted to top-level headlines (#
) as well. - All subsection titles (
.SS
) get converted to third-level headlines (###
).
- Line breaks are done by appending two spaces to the preceding line.
- Paragraph breaks are done through a simple blank like.
- If the filter program is run without the
-f
option (no formatting in code), code blocks will be output with four spaces indentation. - With the
-f
option (limited formatting in code allowed), code blocks will be output as<pre><code>
blocks with<b>
/<i>
HTML formatting.
- Input sequences such as
\(lq
will be converted directly to their UTF-8 representation.- Exception:
\
will be converted to
(HTML entity).
- Exception:
- See Commands.md for a list of recognized sequences.
- Bold text (from
.B
or\fR
) will be formatted with**
. - Italic text (from
.I
or\fI
) will be formatted with_
.
- Lists (
.TP
/.IP
, end with.P
) will be converted to simple*
list items. - Multi-line list items will be indented with two spaces.
- Sub lists (
.RS
–.RE
) will be indented with four extra spaces. .TP
item titles will have two trailing spaces before the linebreak to force a visible linebreak between the item title and the description.
- Plain URLs won't be changed, as most Markdown viewers will automatically turn them into a link.
- Other links will be converted to
[title](url)
. - E-mail links will be converted to
[addr](mailto:addr)
.