<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <meta name="generator" content="md2man 5.1.0 https://github.com/sunaku/md2man" /> <title>md2man(5) — UNIX manual page flavoring for Markdown</title> <link rel="stylesheet" href="../style.css"/> <!--[if lt IE 9]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]--> </head> <body><div class="navbar"><div class="navbar-inner"><span class="brand"><a href="../index.html#man5">man5</a>/md2man.5</span></div></div><div class="container-fluid"><h1 id="md2man-5-2016-02-28-5-1-0"><span class="md2man-title">MD2MAN</span> <span class="md2man-section">5</span> <span class="md2man-date">2016-02-28</span> <span class="md2man-source">5.1.0</span><a name="md2man-5-2016-02-28-5-1-0" href="#md2man-5-2016-02-28-5-1-0" class="md2man-permalink" title="permalink"></a></h1><h2 id="name">NAME<a name="name" href="#name" class="md2man-permalink" title="permalink"></a></h2><p>md2man - UNIX manual page flavoring for <a href="http://daringfireball.net/projects/markdown/syntax">Markdown</a></p><h2 id="description">DESCRIPTION<a name="description" href="#description" class="md2man-permalink" title="permalink"></a></h2><p>md2man makes the <a href="http://daringfireball.net/projects/markdown/syntax">Markdown</a> format more friendly for writing UNIX manual pages by extending its syntax, semantics, and assumed processing extensions.</p><h3 id="syntax">Syntax<a name="syntax" href="#syntax" class="md2man-permalink" title="permalink"></a></h3><p>md2man extends <a href="http://daringfireball.net/projects/markdown/syntax">Markdown</a> syntax by recognizing three kinds of paragraphs, analogous to the underlying <code>.PP</code>, <code>.TP</code>, and <code>.IP</code> directives in <a class="md2man-reference">roff(7)</a>.</p><h4 id="normal-paragraphs">Normal paragraphs<a name="normal-paragraphs" href="#normal-paragraphs" class="md2man-permalink" title="permalink"></a></h4><p>Paragraphs whose lines are all indented by exactly zero or one additional space are considered "normal paragraphs", analogous to <code>.PP</code> in <a class="md2man-reference">roff(7)</a>:</p><pre class="highlight plaintext"><code>This is a normal paragraph. This is also a normal paragraph. And this is a normal paragraph too. </code></pre> <h4 id="tagged-paragraphs">Tagged paragraphs<a name="tagged-paragraphs" href="#tagged-paragraphs" class="md2man-permalink" title="permalink"></a></h4><p>Paragraphs whose first line is indented by less than two additional spaces and whose subsequent lines are all uniformly indented by exactly two additional spaces are considered "tagged paragraphs", analogous to <code>.TP</code> in <a class="md2man-reference">roff(7)</a>:</p><pre class="highlight plaintext"><code>This is a tagged paragraph. </code></pre> <h4 id="indented-paragraphs">Indented paragraphs<a name="indented-paragraphs" href="#indented-paragraphs" class="md2man-permalink" title="permalink"></a></h4><p>Paragraphs whose lines are all uniformly indented by exactly two additional spaces are considered "indented paragraphs", analogous to <code>.IP</code> in <a class="md2man-reference">roff(7)</a>:</p><pre class="highlight plaintext"><code> This is an indented paragraph. </code></pre> <h3 id="semantics">Semantics<a name="semantics" href="#semantics" class="md2man-permalink" title="permalink"></a></h3><p>md2man extends <a href="http://daringfireball.net/projects/markdown/syntax">Markdown</a> semantics by treating top-level headings specially.</p><h4 id="top-level-headings">Top-level headings<a name="top-level-headings" href="#top-level-headings" class="md2man-permalink" title="permalink"></a></h4><p>The first top-level <code><h1></code> heading found in the input is considered to be the <code>.TH</code> directive in <a class="md2man-reference">roff(7)</a>, described under "Title line" in <a class="md2man-reference">man-pages(7)</a> thus:</p> <blockquote> <pre class="highlight plaintext"><code>.TH title section date source manual </code></pre> <dl><dt>title</dt><dd>The title of the man page, written in all caps (e.g., <code>MAN-PAGES</code>).</dd></dl><dl><dt>section</dt><dd>The section number in which the man page should be placed (e.g., <code>7</code>).</dd></dl><dl><dt>date</dt><dd>The date of the last revision, written in the form YYYY-MM-DD.</dd></dl><dl><dt>source</dt><dd>The source of the command, function, or system call (e.g., <code>Linux</code>).</dd></dl><dl><dt>manual</dt><dd>The title of the manual (e.g., <code>Linux Programmer's Manual</code>).</dd></dl></blockquote> <p>Any subsequent top-level headings are treated as second-level <code><h2></code> headings.</p><h3 id="extensions">Extensions<a name="extensions" href="#extensions" class="md2man-permalink" title="permalink"></a></h3><p>md2man enables the following [Redcarpet] extensions while reading <a href="http://daringfireball.net/projects/markdown/syntax">Markdown</a>:</p> <ul> <li>tables</li> <li>autolink</li> <li>superscript</li> <li>strikethrough</li> <li>fenced_code_blocks</li> </ul> <h3 id="examples">Examples<a name="examples" href="#examples" class="md2man-permalink" title="permalink"></a></h3><p>Below is a complete example of an <a class="md2man-reference" href="../man5/md2man.5.html">md2man(5)</a> formatted manual page adapted from the <a href="http://www.schweikhardt.net/man_page_howto.html">Linux Man Page Howto</a> guide by Jens Schweikhardt. <a href="../man0/EXAMPLE.html">The result of processing</a> this example with <a class="md2man-reference">md2man-html(1)</a> has been bundled along with this manual page.</p><pre class="highlight markdown"><code><span class="gu">FOO 1 "MARCH 1995" Linux "User Manuals" ======================================= </span> <span class="gh">NAME ---- </span> foo - frobnicate the bar library <span class="gh">SYNOPSIS -------- </span> <span class="sb">`foo` [`-bar`] [`-c`</span> <span class="ge">*config-file*</span>] <span class="ge">*file*</span> ... <span class="gh">DESCRIPTION ----------- </span> <span class="sb">`foo`</span> frobnicates the bar library by tweaking internal symbol tables. By default it parses all baz segments and rearranges them in reverse order by time for the xyzzy(1) linker to find them. The symdef entry is then compressed using the WBG (Whiz-Bang-Gizmo) algorithm. All files are processed in the order specified. <span class="gh">OPTIONS ------- </span> <span class="sb">`-b`</span> Do not write "busy" to stdout while processing. <span class="sb">`-c`</span> <span class="ge">*config-file*</span> Use the alternate system wide <span class="ge">*config-file*</span> instead of <span class="ge">*/etc/foo.conf*</span>. This overrides any <span class="sb">`FOOCONF`</span> environment variable. <span class="sb">`-a`</span> In addition to the baz segments, also parse the blurfl headers. <span class="sb">`-r`</span> Recursive mode. Operates as fast as lightning at the expense of a megabyte of virtual memory. <span class="gh">FILES ----- </span> <span class="ge">*/etc/foo.conf*</span> The system wide configuration file. See foo(5) for further details. <span class="ge">*~/.foorc*</span> Per user configuration file. See foo(5) for further details. <span class="gh">ENVIRONMENT ----------- </span> <span class="sb">`FOOCONF`</span> If non-null the full pathname for an alternate system wide <span class="ge">*/etc/foo.conf*</span>. Overridden by the <span class="sb">`-c`</span> option. <span class="gh">DIAGNOSTICS ----------- </span> The following diagnostics may be issued on stderr: <span class="gs">**Bad magic number.**</span> The input file does not look like an archive file. <span class="gs">**Old style baz segments.**</span> <span class="sb">`foo`</span> can only handle new style baz segments. COBOL object libraries are not supported in this version. <span class="gh">BUGS ---- </span> The command name should have been chosen more carefully to reflect its purpose. <span class="gh">AUTHOR ------ </span> Jens Schweikhardt <span class="nv"><howto@schweikhardt.net></span> <span class="gh">SEE ALSO -------- </span> bar(1), foo(5), xyzzy(1), <span class="p">[</span><span class="nv">Linux Man Page Howto</span><span class="p">](</span> <span class="sx">http://www.schweikhardt.net/man_page_howto.html</span><span class="p">)</span> </code></pre> <h2 id="see-also">SEE ALSO<a name="see-also" href="#see-also" class="md2man-permalink" title="permalink"></a></h2><p><a href="http://daringfireball.net/projects/markdown/syntax">Markdown</a>, <a class="md2man-reference">man-pages(7)</a>, <a class="md2man-reference">roff(7)</a>, <a class="md2man-reference">md2man-roff(1)</a>, <a class="md2man-reference">md2man-html(1)</a></p></div></body> </html>