-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathpart3-1-2.xml
More file actions
75 lines (75 loc) · 3.17 KB
/
Copy pathpart3-1-2.xml
File metadata and controls
75 lines (75 loc) · 3.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<?xml version="1.0" encoding="UTF-8"?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/xml; charset=utf-8"/>
<title>mandoc (mdocml)</title>
<link rel="stylesheet" href="css/book.css" type="text/css"/>
</head>
<body>
<h3 id="mandoc_sec">
mandoc (mdocml)
</h3>
<p>
The <a class="cmd" href="commands.xml#cmd_mandoc">mandoc</a> utility is a specialised <span class="lang">mdoc</span>
formatter: although it also supports some other UNIX manual formats, it does not accept general-purpose <a class="lang
term" href="glossary.xml#roff">roff</a> input. Development began in 2008 to replace <a class="cmd"
href="commands.xml#cmd_groff">groff</a> with an <a class="term" href="glossary.xml#isc_license">ISC licensed</a>,
high-speed reimplementation.
</p>
<p>
<a class="cmd" href="commands.xml#cmd_mandoc">mandoc</a> may be invoked as <a href="commands.xml#cmd_troff"
class="cmd">troff</a> or <a href="commands.xml#cmd_nroff" class="cmd">nroff</a> as its command-line arguments
overlap. It supports the classical <a class="term" href="glossary.xml#terminal">terminal</a> and <a class="term"
href="glossary.xml#ps">PS</a> forms, and has very strong support for <a class="term"
href="glossary.xml#html">HTML</a> and <a class="term" href="glossary.xml#xhtml">XHTML</a>. <a class="term"
href="glossary.xml#pdf">PDF</a> output is supported as well.
</p>
<p>
By considering <span class="lang">mdoc</span> as a special language, <a href="commands.xml#cmd_mandoc"
class="cmd">mandoc</a> compiles its input into a representation of semantic content. This diverges from <a
href="commands.xml#cmd_troff" class="cmd">troff</a> and its descendants, which compile <span
class="lang">mdoc</span> into its basis form, <span class="lang">roff</span>, then into a presentational
representation. As such, <a href="commands.xml#cmd_mandoc" class="cmd">mandoc</a> is also used for semantically
querying manual content and for the rigorous validation of manuals.
</p>
<p>
The <a href="commands.xml#cmd_mandoc" class="cmd">mandoc</a> utility is supported on both UNIX and non-UNIX operating
systems.
</p>
<h4>
Examples
</h4>
<p>
To validate a manual:
</p>
<div class="cmdline">
mandoc -Tlint file.1
</div>
<p>
To page a manual in the current <a class="term" href="glossary.xml#locale">locale</a> (if supported) so that non-ASCII
special characters render as proper glyphs:
</p>
<div class="cmdline">
mandoc -Tlocale file.1 | less
</div>
<p>
Produce HTML with a style-sheet:
</p>
<div class="cmdline">
mandoc -Thtml -Ostyle=file.css file.1 >file.1.html
</div>
<table class="nav">
<tbody>
<tr>
<td class="nav-contents"><a href="toc.xml">Contents</a></td>
<td class="nav-next"><a href="part3-2.xml">Next</a></td>
<td class="nav-home"><a href="http://manpages.bsd.lv/index.html">Home</a></td>
<td class="nav-history"><a href="http://manpages.bsd.lv/cgi-bin/cvsweb/part3-1-2.xml?cvsroot=manpages">History</a></td>
</tr>
</tbody>
</table>
<p class="edits">
Last edited by $Author$ on $Date$. Copyright © 2011, Kristaps Dzonsons. CC BY-SA.
</p>
</body>
</html>