📄 ch12_01.htm
字号:
<html><head><title>nroff and troff (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="part3.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="ch12_02.htm"><img src="../gifs/txtnexta.gif" alt="Next" border="0" /></a></td></tr></table></div><h1 class="chapter">Chapter 12. nroff and troff</h1><div class="htmltoc"><h4 class="tochead">Contents:</h4><p><a href="ch12_01.htm#sect1">Introduction</a><br /><a href="ch12_02.htm">Command-Line Invocation</a><br /><a href="ch12_03.htm">Conceptual Overview</a><br /><a href="ch12_04.htm">Default Operation of Requests</a><br /><a href="ch12_05.htm">Group Summary of Requests</a><br /><a href="ch12_06.htm">Alphabetical Summary of Requests</a><br /><a href="ch12_07.htm">Escape Sequences</a><br /><a href="ch12_08.htm">Predefined Registers</a><br /><a href="ch12_09.htm">Special Characters</a><br /></p></div><p>This chapter presents the following topics:<a name="unut-ch-12-ix-nroff-program" /><a name="unut-ch-12-ix-troff-program" /><a name="unut-ch-12-ix-text-formatting-nroff-and-troff-programs" /></p><ul><li><p>Introduction</p></li><li><p>Command-line invocation</p></li><li><p>Conceptual overview</p></li><li><p>Default operation of requests</p></li><li><p>Group summary of requests</p></li><li><p>Alphabetical summary of requests</p></li><li><p>Escape sequences</p></li><li><p>Predefined number registers</p></li><li><p>Special characters</p></li></ul><div class="sect1"><a name="unut-ch-12-sect-1" /><h2 class="sect1"><a name="sect1" />12.1. Introduction</h2><p><tt class="literal">nroff</tt> and <tt class="literal">troff</tt> are Unix programs forformatting text files. <tt class="literal">nroff</tt> is designed to format output forline printers and letter-quality printers; you can also display theoutput on your screen. <tt class="literal">troff</tt> is designed for typesettingand laser printers.The same commands work for both programs; <tt class="literal">nroff</tt>simply ignores commands it can't implement.</p><p><tt class="literal">nroff</tt> and <tt class="literal">troff</tt> are not part of standard SVR4but are included in the compatibility packages.It is this version that is documented here.<a name="IXT-12-123354" /><a name="IXT-12-123355" />In addition, we make references to <tt class="literal">ditroff</tt>,or device-independent <tt class="literal">troff</tt>, which isa later version of <tt class="literal">troff</tt>. For the most part,<tt class="literal">ditroff</tt> works the same as <tt class="literal">troff</tt>;where there are distinctions, the original <tt class="literal">troff</tt>is referred to as <tt class="literal">otroff</tt>.The Solaris <tt class="literal">troff</tt> isthe device-independent versionand is a standard part of the Solaris distribution.</p><p>Some Unix vendors include a vendor-specificversion of <tt class="literal">nroff</tt>/<tt class="literal">troff</tt>.Others don't include them at all.Various enhanced packages are also available,such as <tt class="literal">sqtroff</tt> from SoftQuador <tt class="literal">groff</tt> from the Free Software Foundation.<a href="#FOOTNOTE-16">[16]</a>These packages includeadditional requests or escape sequences. For completely accurateinformation, you should consult the text-processing manuals thatcome with your specific version of Unix.</p><blockquote class="footnote"><a name="FOOTNOTE-16" /><p> [16]<tt class="literal">groff</tt> in particular is worth noting; it has numeroususeful extensions over standard <tt class="literal">troff</tt> and is very stable.(See <a href="http://www.gnu.org">http://www.gnu.org</a>).</p></blockquote><p>Finally, if the <tt class="literal">checknr</tt> program is available,you should use it on your <tt class="literal">troff</tt> documents.Note: the device-independent version of <tt class="literal">troff</tt> is 8-bit clean.You may not be so lucky if your system only supplies <tt class="literal">otroff</tt>.</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="part3.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_02.htm"><img src="../gifs/txtnexta.gif" alt="Next" border="0" /></a></td></tr><tr><td align="left" valign="top" width="228">III. Text Formatting</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.2. Command-Line Invocation</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 + -