?? ch16_01.htm
字號:
<html><head><title>man Macros (UNIX in a Nutshell: System V Edition)</title><link rel="stylesheet" type="text/css" href="../style/style1.css" /><meta name="DC.Creator" content="Arnold Robbins" /><meta name="DC.Format" content="text/xml" scheme="MIME" /><meta name="DC.Language" content="en-US" /><meta name="DC.Publisher" content="O'Reilly & Associates, Inc." /><meta name="DC.Source" scheme="ISBN" content="1-56592-427-4" /><meta name="DC.Subject.Keyword" content="stuff" /><meta name="DC.Title" content="UNIX in a Nutshell: System V Edition" /><meta name="DC.Type" content="Text.Monograph" /></head><body bgcolor="#ffffff"><img src="gifs/smbanner.gif" usemap="#banner-map" border="0" alt="Book Home" /><map name="banner-map"><area shape="rect" coords="1,-2,616,66" href="index.htm" alt="Book Title" /><area shape="rect" coords="629,-11,726,25" href="jobjects/fsearch.htm" alt="Search this book" /></map><div class="navbar"><table width="684" border="0"><tr><td align="left" valign="top" width="228"><a href="ch15_04.htm"><img src="../gifs/txtpreva.gif" alt="Previous" border="0" /></a></td><td align="center" valign="top" width="228" /><td align="right" valign="top" width="228"><a href="ch16_02.htm"><img src="../gifs/txtnexta.gif" alt="Next" border="0" /></a></td></tr></table></div><h1 class="chapter">Chapter 16. man Macros</h1><div class="htmltoc"><h4 class="tochead">Contents:</h4><p><a href="ch16_01.htm#sect1">Alphabetical Summary of man Macros</a><br /><a href="ch16_02.htm">Predefined Strings</a><br /><a href="ch16_03.htm">Internal Names</a><br /><a href="ch16_04.htm">Sample Document</a><br /></p></div><p>This chapter presents the following topics:</p><ul><li><p>Alphabetical summary of the <em class="emphasis">man</em> macros</p></li><li><p>Predefined strings</p></li><li><p>Names used internally by the <em class="emphasis">man</em> macros</p></li><li><p>Sample document</p></li></ul><div class="sect1"><a name="unut-ch-16-sect-1" /><h2 class="sect1"><a name="sect1" />16.1. Alphabetical Summary of man Macros</h2><p>As many as six arguments may be given for all the macros that change fonts or producea heading.Use double quotes around multiple words to get longer headings.<a name="ch16.man" /><a name="ch16.man2" /><a name="ch16.man3" /></p><p>The<tt class="literal">.TS</tt>,<tt class="literal">.TE</tt>,<tt class="literal">.EQ</tt>,and<tt class="literal">.EN</tt>macros are not defined by the <em class="emphasis">man</em> macros.But because <tt class="literal">nroff</tt> and <tt class="literal">troff</tt> ignoreunknown requests, you can still use them in your manpages;<tt class="literal">tbl</tt> and <tt class="literal">eqn</tt> work with no problems.</p><table border="1" cellpadding="5"><tr><td valign="top"><a name=".B">.B</a></td><td><p><tt class="literal">.B</tt> [<em class="replaceable"><tt>text</tt></em> ...]</p><p>Set the arguments in the bold font, with a space between each argument.If no arguments are supplied, the next input line is set in bold.</p></td></tr><tr><td valign="top"><a name=".BI">.BI</a></td><td><p><tt class="literal">.BI</tt> <em class="replaceable"><tt>barg</em> <em class="replaceable">iarg</tt></em> ...</p><p>Setalternating <em class="emphasis">barg</em> in boldand <em class="emphasis">iarg</em> in italic, with nointervening spaces.</p></td></tr><tr><td valign="top"><a name=".BR">.BR</a></td><td><p><tt class="literal">.BR</tt> <em class="replaceable"><tt>barg</em> <em class="replaceable">rarg</tt></em> ...</p><p>Set alternating <em class="emphasis">barg</em> in boldand <em class="emphasis">rarg</em> in roman, with nointervening spaces.</p></td></tr><tr><td valign="top"><a name=".DT">.DT</a></td><td><p><tt class="literal">.DT</tt></p><p>Reset the tab stops to their defaults, every 1/2 inch.</p></td></tr><tr><td valign="top"><a name=".HP">.HP</a></td><td><p><tt class="literal">.HP</tt> [<em class="replaceable"><tt>indent</em>]</p><p><em class="replaceable">tag text</tt></em></p><p>Start a paragraph with a “hanging” indent, one wherea tag sits out to the left side.The optional <em class="emphasis">indent</em> is how far to indentthe paragraph.The tag text follows on the next line.See the example under <b class="emphasis-bold"><a href="#.TP">.TP</a></b>.</p></td></tr><tr><td valign="top"><a name=".I">.I</a></td><td><p><tt class="literal">.I</tt> [<em class="replaceable"><tt>text</tt></em> ...]</p><p>Set the arguments in the italic font, with a space between each argument.If no arguments are supplied, the next input line is set in italic.</p></td></tr><tr><td valign="top"><a name=".IB">.IB</a></td><td><p><tt class="literal">.IB</tt> <em class="replaceable"><tt>iarg</em> <em class="replaceable">barg</tt></em> ...</p><p>Set alternating <em class="emphasis">iarg</em> in italicand <em class="emphasis">barg</em> in bold, with nointervening spaces.</p></td></tr><tr><td valign="top"><a name=".IP">.IP</a></td><td><p><tt class="literal">.IP</tt> <em class="replaceable"><tt>tag</em> [<em class="replaceable">indent</tt></em>]</p><p>Start a paragraph with a hanging indent, one wherea tag sits out to the left side.Unlike <tt class="literal">.HP</tt> and <tt class="literal">.TP</tt>,the <em class="emphasis">tag</em> is supplied as an argument to the macro.The optional <em class="emphasis">indent</em> is how far to indentthe paragraph.</p><h4 class="refsect2">Example</h4><blockquote><pre class="code">.IP 1.The first point is ....IP 2.The second point is ...</pre></blockquote></td></tr><tr><td valign="top"><a name=".IR">.IR</a></td><td><p><tt class="literal">.IR</tt> <em class="replaceable"><tt>iarg</em> <em class="replaceable">rarg</tt></em> ...</p><p>Set alternating <em class="emphasis">iarg</em> in italicand <em class="emphasis">rarg</em> in roman, with nointervening spaces.</p></td></tr><tr><td valign="top"><a name=".IX">.IX</a></td><td><p><tt class="literal">.IX</tt> <em class="replaceable"><tt>text</tt></em></p><p>Index macro. Solaris only; intended for SunSoft internal use.</p></td></tr><tr><td valign="top"><a name=".LP">.LP</a></td><td><p><tt class="literal">.LP</tt></p><p>Start a new paragraph.Just like <tt class="literal">.PP</tt>.</p></td></tr><tr><td valign="top"><a name=".P">.P</a></td><td><p><tt class="literal">.P</tt></p><p>Start a new paragraph.Just like <tt class="literal">.PP</tt>.</p></td></tr><tr><td valign="top"><a name=".PD">.PD</a></td><td><p><tt class="literal">.PD</tt> [<em class="replaceable"><tt>distance</tt></em>]</p><p>Set the interparagraph spacing to <em class="emphasis">distance</em>.With no argument, reset it to the default.Most useful to get multiple tags for a paragraph.</p><h4 class="refsect2">Example</h4><p>Show that two options do the same thing.</p><blockquote><pre class="code">.PP.I Whizprogaccepts the following options..TP \w'\fB\-\^\-help\fP'u+3n.PD 0.B \-h.TP.PD.B \-\^\-helpPrint a helpful message and exit.</pre></blockquote></td></tr><tr><td valign="top"><a name=".PP">.PP</a></td><td><p><tt class="literal">.PP</tt></p><p>Start a new paragraph.This macro resets all the defaults, such as point size, font,and spacing.</p></td></tr><tr><td valign="top"><a name=".RB">.RB</a></td><td><p><tt class="literal">.RB</tt> <em class="replaceable"><tt>rarg</em> <em class="replaceable">barg</tt></em> ...</p><p>Set alternating <em class="emphasis">rarg</em> in romanand <em class="emphasis">barg</em> in bold, with nointervening spaces.</p></td></tr><tr><td valign="top"><a name=".RE">.RE</a></td><td><p><tt class="literal">.RE</tt></p><p>End a relative indent. Each <tt class="literal">.RE</tt> should matcha preceding <tt class="literal">.RS</tt>.See <b class="emphasis-bold"><a href="#.RS">.RS</a></b> for an example.</p></td></tr><tr><td valign="top"><a name=".RI">.RI</a></td><td><p><tt class="literal">.RI</tt> <em class="replaceable"><tt>rarg</em> <em class="replaceable">iarg</tt></em> ...</p><p>Set alternating <em class="emphasis">rarg</em> in romanand <em class="emphasis">iarg</em> in italic, with nointervening spaces.</p></td></tr><tr><td valign="top"><a name=".RS">.RS</a></td><td><p><tt class="literal">.RS</tt> [<em class="replaceable"><tt>indent</tt></em>]</p><p>Start a relative indent.Each successive <tt class="literal">.RS</tt> increases the indent.The optional <em class="emphasis">indent</em> is how far to indentthe following text.Each <tt class="literal">.RS</tt> should havean accompanying <tt class="literal">.RE</tt>.</p><h4 class="refsect2">Example</h4><blockquote><pre class="code">.PPThere are a number of important points to remember..RS.IP 1.The first point is ....IP 2.The second point is .......REForget these at your own risk!</pre></blockquote></td></tr><tr><td valign="top"><a name=".SB">.SB</a></td><td><p><tt class="literal">.SB</tt> <em class="replaceable"><tt>arg</tt></em> ...</p><p>Set arguments in bold,using a smaller point size, separated by spaces.</p></td></tr><tr><td valign="top"><a name=".SH">.SH</a></td><td><p><tt class="literal">.SH</tt> <em class="replaceable"><tt>arg</tt></em> ...</p><p>Section header.Start a new section, such as <tt class="literal">NAME</tt>or <tt class="literal">SYNOPSIS</tt>.Use double quotes around multiple words for longer headings.</p></td></tr><tr><td valign="top"><a name=".SM">.SM</a></td><td><p><tt class="literal">.SM</tt> <em class="replaceable"><tt>arg</tt></em> ...</p><p>Set arguments in roman,using a smaller point size, separated by spaces.</p></td></tr><tr><td valign="top"><a name=".SS">.SS</a></td><td><p><tt class="literal">.SS</tt> <em class="replaceable"><tt>arg</tt></em> ...</p><p>Subsectionheader.Start a new subsection.Use double quotes around multiple words for longer headings.</p></td></tr><tr><td valign="top"><a name=".TH">.TH</a></td><td><p><tt class="literal">.TH</tt> <em class="replaceable"><tt>title</em> <em class="replaceable">section</em> <em class="replaceable">date</tt></em> ...</p><p>Title heading.This is the first macro of a manpage, and sets the header and footerlines.The <em class="emphasis">title</em> is the name of the manpage.The <em class="emphasis">section</em> is the section the manpage should be in (a number, possibly followed by a letter).The <em class="emphasis">date</em> is the date the manpage waslast updated.Different systems have different conventions for the remaining argumentsto this macro.For Solaris, the fourth and fifth arguments are the left-page footerand the main (center) header.</p><h4 class="refsect2">Example</h4><blockquote><pre class="code">.TH WHIZPROG 1L "April 1, 1999".SH NAMEwhizprog \- do amazing things...</pre></blockquote></td></tr><tr><td valign="top"><a name=".TP">.TP</a></td><td><p><tt class="literal">.TP</tt> [<em class="replaceable"><tt>indent</em>]</p><p><em class="replaceable">tag text</tt></em></p><p>Start a paragraph with a hanging indent, one wherea tag sits out to the left side.The optional <em class="emphasis">indent</em> is how far to indentthe paragraph.The tag text follows on the next line.See also the example under <b class="emphasis-bold">.PD</b>.</p><h4 class="refsect2">Example</h4><blockquote><pre class="code">.TP .2i1.The first point is ....TP .2i2.The second point is ...</pre></blockquote></td></tr></table><p></div><hr width="684" align="left" /><div class="navbar"><table width="684" border="0"><tr><td align="left" valign="top" width="228"><a href="ch15_04.htm"><img src="../gifs/txtpreva.gif" alt="Previous" border="0" /></a></td><td align="center" valign="top" width="228"><a href="index.htm"><img src="../gifs/txthome.gif" alt="Home" border="0" /></a></td><td align="right" valign="top" width="228"><a href="ch16_02.htm"><img src="../gifs/txtnexta.gif" alt="Next" border="0" /></a></td></tr><tr><td align="left" valign="top" width="228">15.4. Sample Document</td><td align="center" valign="top" width="228"><a href="index/index.htm"><img src="../gifs/index.gif" alt="Book Index" border="0" /></a></td><td align="right" valign="top" width="228">16.2. Predefined Strings</td></tr></table></div><hr width="684" align="left" /><img src="../gifs/navbar.gif" usemap="#library-map" border="0" alt="Library Navigation Links" /><p><p><font size="-1"><a href="copyrght.htm">Copyright © 2003</a> O'Reilly & Associates. All rights reserved.</font></p><map name="library-map"><area shape="rect" coords="1,0,88,96" href="../index.htm"><area shape="rect" coords="90,0,165,96" href="../upt/index.htm"><area shape="rect" coords="168,1,253,107" href="../mac/index.htm"><area shape="rect" coords="255,0,335,97" href="../korn/index.htm"><area shape="rect" coords="337,0,415,109" href="../unixnut/index.htm"><area shape="rect" coords="417,0,512,122" href="../sedawk/index.htm"><area shape="rect" coords="514,0,605,105" href="../lunix/index.htm"><area shape="rect" coords="611,2,694,121" href="../vi/index.htm"> </map></body></html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -