⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ch12_06.htm

📁 unix基础教程
💻 HTM
📖 第 1 页 / 共 3 页
字号:
<p>Note:  inside a macro definition, <tt class="literal">\n</tt> should be <tt class="literal">\\n</tt>.</p></td></tr><tr><td valign="top"><a name=".ns">.ns</a></td><td><p><tt class="literal">.ns</tt></p><p>Turn on no-space mode. See also <b class="emphasis-bold"><a href="#.rs">.rs</b>.</p></td></tr><tr><td valign="top"><a name=".nx">.nx</a></td><td><p><tt class="literal">.nx</tt> <em class="replaceable"><tt>file</tt></em></p><p>Switch to <em class="emphasis">file</em> and do not return to current file. See also <b class="emphasis-bold"><a href="#.so">.so</b>.</p></td></tr><tr><td valign="top"><a name=".os">.os</a></td><td><p><tt class="literal">.os</tt></p><p>Output saved space specified in previous <tt class="literal">.sv</tt> request.</p></td></tr><tr><td valign="top"><a name=".pc">.pc</a></td><td><p><tt class="literal">.pc</tt> <em class="replaceable"><tt>c</tt></em></p><p>Use <em class="emphasis">c</em> (instead of <tt class="literal">%</tt>) as thepage number character within <tt class="literal">nroff</tt>/<tt class="literal">troff</tt> coding.</p></td></tr><tr><td valign="top"><a name=".pi">.pi</a></td><td><p><tt class="literal">.pi</tt> <em class="replaceable"><tt>command</tt></em></p><p>Pipe the formatter output through a Unix <em class="emphasis">command</em>, instead of placing it on standard output (<tt class="literal">ditroff</tt> and <tt class="literal">nroff</tt> only).Request must occur before any output.</p><h4 class="refsect2">Example</h4><blockquote><pre class="code">.pi /usr/bin/col     <i class="lineannotation">Process nroff output with col</i></pre></blockquote></td></tr><tr><td valign="top"><a name=".pl">.pl</a></td><td><p><tt class="literal">.pl</tt> [[<tt class="literal">&#177;</tt>]<em class="replaceable"><tt>n</tt></em>]</p><p>Set page length to <em class="emphasis">n</em> or increment page lengthby &#177;<em class="emphasis">n</em>.  If no argument,restore default. Current page length is stored in register <tt class="literal">.p</tt>.Default is 11 inches.</p></td></tr><tr><td valign="top"><a name=".pm">.pm</a></td><td><p><tt class="literal">.pm</tt></p><p>Print names and sizes of all defined macros.</p></td></tr><tr><td valign="top"><a name=".pn">.pn</a></td><td><p><tt class="literal">.pn</tt> [[<tt class="literal">&#177;</tt>]<em class="replaceable"><tt>n</tt></em>]</p><p>Set next page number to <em class="emphasis">n</em> or increment page number by&#177;<em class="emphasis">n</em>.  Current page number is stored in register <tt class="literal">%</tt>.</p></td></tr><tr><td valign="top"><a name=".po">.po</a></td><td><p><tt class="literal">.po</tt> [[<tt class="literal">&#177;</tt>]<em class="replaceable"><tt>n</tt></em>]</p><p>Offset text a distance of <em class="emphasis">n</em> from left edge of page or elseincrement the current offset by &#177;<em class="emphasis">n</em>.  If no argument, returnto previous offset.  Current page offset is stored in register<tt class="literal">.o</tt>.</p></td></tr><tr><td valign="top"><a name=".ps">.ps</a></td><td><p><tt class="literal">.ps</tt> <em class="replaceable"><tt>n</tt></em></p><p>Set point size to <em class="emphasis">n</em> (<tt class="literal">troff</tt> only,accepted but ignored by <tt class="literal">nroff</tt>).  Current point size isstored in register <tt class="literal">.s</tt>.  Default is 10 points.</p></td></tr><tr><td valign="top"><a name=".rd">.rd</a></td><td><p><tt class="literal">.rd</tt> [<em class="replaceable"><tt>prompt</tt></em>]</p><p>Read input from terminal, after printing optional <em class="emphasis">prompt</em>.</p></td></tr><tr><td valign="top"><a name=".rm">.rm</a></td><td><p><tt class="literal">.rm</tt> <em class="replaceable"><tt>xx</tt></em></p><p>Remove request macro or string <em class="emphasis">xx</em>.</p></td></tr><tr><td valign="top"><a name=".rn">.rn</a></td><td><p><tt class="literal">.rn</tt> <em class="replaceable"><tt>xx yy</tt></em></p><p>Rename request, macro, or string <em class="emphasis">xx</em> to <em class="emphasis">yy</em>.</p></td></tr><tr><td valign="top"><a name=".rr">.rr</a></td><td><p><tt class="literal">.rr</tt> <em class="replaceable"><tt>r</tt></em></p><p>Remove register <em class="emphasis">r</em>.  See also <b class="emphasis-bold"><a href="#.nr">.nr</b>. </p></td></tr><tr><td valign="top"><a name=".rs">.rs</a></td><td><p><tt class="literal">.rs</tt></p><p>Restore spacing (disable no-space mode).  See <b class="emphasis-bold"><a href="#.ns">.ns</a></b>.</p></td></tr><tr><td valign="top"><a name=".rt">.rt</a></td><td><p><tt class="literal">.rt</tt> [<tt class="literal">&#177;</tt><em class="replaceable"><tt>n</tt></em>]</p><p>Return (upward only) to marked vertical place, or to &#177;<em class="emphasis">n</em> fromtop of page or diversion.  See also <b class="emphasis-bold"><a href="#.mk">.mk</b>.</p></td></tr><tr><td valign="top"><a name=".so">.so</a></td><td><p><tt class="literal">.so</tt> <em class="replaceable"><tt>file</tt></em></p><p>Switch out to <em class="emphasis">file</em>, then return to current file; that is, read the contents of another <em class="emphasis">file</em> into the current file.See also <b class="emphasis-bold"><a href="#.nx">.nx</b>.</p></td></tr><tr><td valign="top"><a name=".sp">.sp</a></td><td><p><tt class="literal">.sp</tt> <em class="replaceable"><tt>n</tt></em></p><p>Leave <em class="emphasis">n</em> blank lines.  Default is 1.You may use any vertical value, with an appropriateunit specifier, for <em class="emphasis">n</em>.</p></td></tr><tr><td valign="top"><a name=".ss">.ss</a></td><td><p><tt class="literal">.ss</tt> <em class="replaceable"><tt>n</tt></em></p><p>Set space-character size to <em class="emphasis">n</em>/36 em (no effect in <tt class="literal">nroff</tt>).</p></td></tr><tr><td valign="top"><a name=".sv">.sv</a></td><td><p><tt class="literal">.sv</tt> <em class="replaceable"><tt>n</tt></em></p><p>Save <em class="emphasis">n</em> lines of space; output saved space with <tt class="literal">.os</tt>.</p></td></tr><tr><td valign="top"><a name=".sy">.sy</a></td><td><p><tt class="literal">.sy</tt> <em class="replaceable"><tt>command</em> [<em class="replaceable">args</tt></em>]</p><p>Execute Unix <em class="emphasis">command</em> with optional arguments (<tt class="literal">ditroff</tt> only).</p><h4 class="refsect2">Example</h4><p>Search for the first argument; accumulate in a temp file:</p><blockquote><pre class="code">.sy sed -n 's/\\$1/Note: &amp;/p' list &gt;&gt; /tmp/notesfile</pre></blockquote><p>(Note the extra backslash in <tt class="literal">\\$1</tt>.This example occurs inside a macro definition.One backslash is stripped off when the macro is first read,so the second one is needed for it to be evaluated correctly when themacro is executed.)</p></td></tr><tr><td valign="top"><a name=".ta">.ta</a></td><td><p><tt class="literal">.ta</tt> <em class="replaceable"><tt>n</em>[<em class="replaceable">t</em>] [<tt class="literal">+</tt>]<em class="replaceable">m</em>[<em class="replaceable">t</tt></em>] ...</p><p>Set tab stops at positions <em class="emphasis">n</em>, <em class="emphasis">m</em>, etc.  If <em class="emphasis">t</em> is not given, tab is left-adjusting.  Use a <tt class="literal">+</tt> to move relative to the previoustab stop.</p><h4 class="refsect2">Values for t</h4><table border="1" cellpadding="3"><tr><td><tt class="literal">L</tt></td><td><p>Left adjust</p></td></tr><tr><td><tt class="literal">R</tt></td><td><p>Right adjust</p></td></tr><tr><td><tt class="literal">C</tt></td><td><p>Center</p></td></tr></table><p></td></tr><tr><td valign="top"><a name=".tc">.tc</a></td><td><p><tt class="literal">.tc</tt> <em class="replaceable"><tt>c</tt></em></p><p>Define tab repetition character as <em class="emphasis">c</em> (instead of whitespace).<tt class="literal">nroff</tt>/<tt class="literal">troff</tt> uses <em class="emphasis">c</em>when expanding tabs.For example, you might use <tt class="literal">.tc&#160;.</tt> when formatting atable of contents.</p></td></tr><tr><td valign="top"><a name=".ti">.ti</a></td><td><p><tt class="literal">.ti</tt> [[<tt class="literal">&#177;</tt>]<em class="replaceable"><tt>n</tt></em>]</p><p>Temporary indent.  Indent the next output line by <em class="emphasis">n</em> or increment the current indent by &#177;<em class="emphasis">n</em> for the next output line.Default scale is ems.</p><h4 class="refsect2">Example</h4><blockquote><pre class="code">.in 10.ti -5The first line of this paragraph sticks out by 5 ems ....in -10</pre></blockquote></td></tr><tr><td valign="top"><a name=".tl">.tl</a></td><td><p><tt class="literal">.tl</tt> <tt class="literal">'</tt><em class="replaceable"><tt>l</em><tt class="literal">'</tt><em class="replaceable">c</em><tt class="literal">'</tt><em class="replaceable">r</tt></em><tt class="literal">'</tt></p><p>Specify <em class="emphasis">l</em>eft, <em class="emphasis">c</em>entered, or <em class="emphasis">r</em>ight title.Title length is specified by <tt class="literal">.lt</tt>, not <tt class="literal">.ll</tt>.Use <tt class="literal">%</tt> to get the page number, for example,<tt class="literal">.tl ''- % -''</tt>.</p></td></tr><tr><td valign="top"><a name=".tm">.tm</a></td><td><p><tt class="literal">.tm</tt> <em class="replaceable"><tt>text</tt></em></p><p>Terminal message.  Print <em class="emphasis">text</em> on standard error.Useful for debugging, as well for producing indexesand cross references.</p></td></tr><tr><td valign="top"><a name=".tr">.tr</a></td><td><p><tt class="literal">.tr</tt> <em class="replaceable"><tt>ab</tt></em>...</p><p>Translate character <em class="emphasis">a</em> (first of a pair) to <em class="emphasis">b</em> (second of pair).</p><h4 class="refsect2">Example</h4><p>Produce uppercase and later restore.  Useful for title macros:</p><blockquote><pre class="code">.tr aAbBcCdDeEfFgGhHiIjJkKlLmM     <i class="lineannotation">Et cetera</i>.tr aabbccddeeffgghhiijjkkllmm     <i class="lineannotation">Et cetera</i></pre></blockquote></td></tr><tr><td valign="top"><a name=".uf">.uf</a></td><td><p><tt class="literal">.uf</tt> <em class="replaceable"><tt>f</tt></em></p><p>Set underline font to <em class="emphasis">f</em> (to be switched to by <tt class="literal">.ul</tt> or<tt class="literal">.cu</tt>); default is <em class="emphasis">italics</em>.</p></td></tr><tr><td valign="top"><a name=".ul">.ul</a></td><td><p><tt class="literal">.ul</tt> [<em class="replaceable"><tt>n</tt></em>]</p><p>Underline (italicize in <tt class="literal">troff</tt>) next <em class="emphasis">n</em> input lines.Do not underline inter-word spaces.  Use <tt class="literal">.cu</tt> for continuousunderline.Underline font can be switched in <tt class="literal">troff</tt> with <tt class="literal">.uf</tt> request.However, you must use a macro to actually underline in <tt class="literal">troff</tt>.</p></td></tr><tr><td valign="top"><a name=".vs">.vs</a></td><td><p><tt class="literal">.vs</tt> [<em class="replaceable"><tt>n</tt></em>]</p><p>Set vertical line spacing to <em class="emphasis">n</em>.  If noargument, restore previous spacing.  Current vertical spacing isstored in register <tt class="literal">.v</tt>.  Default is 1/6 inch.</p></td></tr><tr><td valign="top"><a name=".wh">.wh</a></td><td><p><tt class="literal">.wh</tt> <em class="replaceable"><tt>n</em> [<em class="replaceable">xx</tt></em>]</p><p>The &#8220;when&#8221; request.When position <em class="emphasis">n</em> is reached, execute macro <em class="emphasis">xx</em>;negative values are calculated with respect to the bottom of the page.If <em class="emphasis">xx</em> is not supplied, remove any trap(s)at that location.(A trap is the position on the page where a given macro is executed.)Two traps can be at the same location if one is moved over the otherwith <tt class="literal">.ch</tt>.  They cannot be placed at the same location with<tt class="literal">.wh</tt>.</p></td></tr></table><p><hr width="684" align="left" /><div class="navbar"><table width="684" border="0"><tr><td align="left" valign="top" width="228"><a href="ch12_05.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="ch12_07.htm"><img src="../gifs/txtnexta.gif" alt="Next" border="0" /></a></td></tr><tr><td align="left" valign="top" width="228">12.5. Group Summary of Requests</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">12.7. Escape Sequences</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 &copy; 2003</a> O'Reilly &amp; 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 + -