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

📄 unx22.htm

📁 Linux Unix揭密.高质量电子书籍.对学习Linux有大帮助,欢迎下载学习.
💻 HTM
📖 第 1 页 / 共 2 页
字号:
<BR></FONT></A></CENTER></H4>

<P>man recognizes the .R (roman), .I (italics), and .B (bold) macros, all of which operate exactly as they do in ms and mm. Because man was originally designed to produce output using only those fonts&#151;no monospace&#151;it also has some macros that 
specify alternating fonts. At first glance, these seem superfluous. Take another look, though, at the code. Formatted without monospace, the first part of the syntax line would have alternated bold and oman:

<BR></P>

<PRE>.BR

namehim [ F | L ]  [ -a ...</PRE>

<P>man permits all six permutations of alternating roman, italic, and bold fonts:

<BR></P>

<PRE>

<BR>.RI



<BR>.RB



<BR>.IR



<BR>.IB



<BR>.BR



<BR>.BI</PRE>

<P>You may never have occasion to use these macros, but it's nice to know that they're available.

<BR></P>

<P>In addition to the font change macros, there is one macro for changing point size: .SM. (Users of ms might wonder what became of .LG and .NL.) man needs .SM more than the other macro packages because manual pages contain terms with long names that must 

be written in capital letters. To make these terms more readable and to conserve space, man includes a macro that produces a smaller point size&#151;two points smaller.

<BR></P>

<P>.SM has another special use: printing the word UNIX in capital or small cap letters. Because UNIX is a registered trademark, it should be printed in a way that distinguishes it from ordinary text. Sometimes it appears in all capital letters. Another 
acceptable way is with a capital U and small capital N, I, and X, as in Unix.

<BR></P>

<H4 ALIGN="CENTER">

<CENTER><A ID="I10" NAME="I10">

<FONT SIZE=3><B>Preprocessor Macros</B>

<BR></FONT></A></CENTER></H4>

<P>The only preprocessor macros recognized by man are the .TS and .TE table macros. Remember not to use the table macro .TH.

<BR></P>

<H4 ALIGN="CENTER">

<CENTER><A ID="I11" NAME="I11">

<FONT SIZE=3><B>Predefined Strings</B>

<BR></FONT></A></CENTER></H4>

<P>The man package has three predefined strings. They are

<BR></P>

<TABLE BORDER>

<TR>

<TD>

<P>\*R</P>

<TD>

<P>Produces the registered trademark symbol</P>

<TR>

<TD>

<P>\*(Tm</P>

<TD>

<P>Produces the trademark symbol</P>

<TR>

<TD>

<P>\*S</P>

<TD>

<P>Returns to the default point size and vertical spacing</P></TABLE>

<H4 ALIGN="CENTER">

<CENTER><A ID="I12" NAME="I12">

<FONT SIZE=3><B>Miscellaneous Macros</B>

<BR></FONT></A></CENTER></H4>

<P>.TH resets tab stops whenever it is called. The default settings are every 7.2 ens in troff and every 5 ens in nroff. However, experimenting with various customized indents might affect tab settings. If you want to restore the tab settings and you can't 

wait for the next .TH, use the .DT macro.

<BR></P>

<P>The .PM (proprietary marking) macro is interesting for its history, but unless you change its text, it isn't really useful. It takes two arguments. The first argument identifies the type of marking, such as Proprietary or Restricted. The second argument 

is the year. If you omit the year, the default is the current year.

<BR></P>

<H4 ALIGN="CENTER">

<CENTER><A ID="I13" NAME="I13">

<FONT SIZE=3><B>Using </B><B><I>man</I></B><B> Macros with </B><B><I>troff</I></B><B> and </B><B><I>nroff</I></B>

<BR></FONT></A></CENTER></H4>

<P>You can invoke the man macros with the troff or nroff command. Printing man files is covered in detail in the &quot;Printing Files Formatted with man Macros&quot; section in Chapter 29, &quot;Processing and Printing Formatted Files.&quot;

<BR></P>

<H4 ALIGN="CENTER">

<CENTER><A ID="I14" NAME="I14">

<FONT SIZE=3><B><I>man</I></B><B> Macro Summary</B>

<BR></FONT></A></CENTER></H4>

<P>Table 22.1 lists the man macros and describes their functions.

<BR></P>

<UL>

<LH><B>Table 22.1. Summary of the </B><B>man</B><B> macros.</B>

<BR></LH></UL>

<TABLE BORDER>

<TR>

<TD>

<PRE><I>Macro</I>

<BR></PRE>

<TD>

<PRE><I>Description</I>

<BR></PRE>

<TD>

<PRE><I>Comments</I>

<BR></PRE>

<TR>

<TD>

<P>.B</P>

<TD>

<P>Bold</P>

<TD>

<P>With text, sets text in bold. On a line by itself, changes to bold font.</P>

<TR>

<TD>

<P>.BI</P>

<TD>

<P>Bold italic</P>

<TD>

<P>Alternates bold and italic fonts.</P>

<TR>

<TD>

<P>.BR</P>

<TD>

<P>Bold roman</P>

<TD>

<P>Alternates bold and roman fonts.</P>

<TR>

<TD>

<P>.DT</P>

<TD>

<P>Defines tabs and sets and tab stops </P>

<TD>

<P>The default is 7.2 ens in troff 5 ens in nroff.</P>

<TR>

<TD>

<P>.HP</P>

<TD>

<P>Hanging paragraph</P>

<TD>

<P><BR></P>

<TR>

<TD>

<P>.I</P>

<TD>

<P>Italics</P>

<TD>

<P>With text, sets text in italics. On a line by itself, changes to italic font.</P>

<TR>

<TD>

<P>.IB</P>

<TD>

<P>Italic bold</P>

<TD>

<P>Alternates italic and bold fonts.</P>

<TR>

<TD>

<P>.IP</P>

<TD>

<P>Indented paragraph</P>

<TD>

<P><BR></P>

<TR>

<TD>

<P>.IR</P>

<TD>

<P>Italic roman</P>

<TD>

<P>Alternates italic and roman fonts.</P>

<TR>

<TD>

<P>.LP</P>

<TD>

<P>Block-style paragraph</P>

<TD>

<P><BR></P>

<TR>

<TD>

<P>.P</P>

<TD>

<P>Paragraph</P>

<TD>

<P>Synonym for .PP. .P actually calls .PP.</P>

<TR>

<TD>

<P>.PD</P>

<TD>

<P>Sets the distance between paragraphs 1v</P>

<TD>

<P>The default is .4v in troff and in nroff.</P>

<TR>

<TD>

<P>.PM</P>

<TD>

<P>Proprietary marking</P>

<TD>

<P>This is an AT&amp;T macro for placing different types of Proprietary notices at the bottom of each page.</P>

<TR>

<TD>

<P>.PP</P>

<TD>

<P>Paragraph</P>

<TD>

<P><BR></P>

<TR>

<TD>

<P>.R</P>

<TD>

<P>Roman</P>

<TD>

<P>With text, sets text in roman type. On a line by itself, changes to roman type.</P>

<TR>

<TD>

<P>.RB</P>

<TD>

<P>Roman bold</P>

<TD>

<P>Alternates roman and bold fonts.</P>

<TR>

<TD>

<P>.RE</P>

<TD>

<P>Ends a relative indent begun by .RS</P>

<TD>

<P><BR></P>

<TR>

<TD>

<P>.RI</P>

<TD>

<P>Roman italic</P>

<TD>

<P>Alternates roman and italic fonts.</P>

<TR>

<TD>

<P>.RS</P>

<TD>

<P>Begins a relative indent</P>

<TD>

<P><BR></P>

<TR>

<TD>

<P>.SH</P>

<TD>

<P>Subhead</P>

<TD>

<P><BR></P>

<TR>

<TD>

<P>.SM</P>

<TD>

<P>Reduces point size by 2 points</P>

<TD>

<P>Stands for small.0</P>

<TR>

<TD>

<P>.SS</P>

<TD>

<P>Sub-subhead</P>

<TD>

<P><BR></P>

<TR>

<TD>

<P>.TE</P>

<TD>

<P>Table end</P>

<TD>

<P><BR></P>

<TR>

<TD>

<P>.TH</P>

<TD>

<P>Title head</P>

<TD>

<P>.SN NAME is the crucial macro for producing the permuted index</P>

<TR>

<TD>

<P>.TP</P>

<TD>

<P>Indented paragraph with hanging tag.</P>

<TD>

<P><BR></P>

<TR>

<TD>

<P>.TS</P>

<TD>

<P>Table start</P>

<TD>

<P>Supposedly, the H argument with the .TH macro for continuing table column heads works with the man macros. It's safer, though, to avoid the issue.</P></TABLE>

<H3 ALIGN="CENTER">

<CENTER><A ID="I15" NAME="I15">

<FONT SIZE=4><B>Summary</B>

<BR></FONT></A></CENTER></H3>

<P>Macro packages take the guesswork out of formatting. Your document has a defined &quot;look and feel&quot;&#151;no surprises. And it's easier than you think to use a macro package. As you work with a package, you learn more about it, but you can start 
with only the basics and produce good-looking documents.<A ID="I16" NAME="I16"></A>

<BR></P>

<P><A HREF="unx21.htm"><IMG SRC="bluprev.gif" WIDTH = 32 HEIGHT = 32 BORDER = 0 ALT="Previous Page"></A>

<A HREF="index.htm"><IMG SRC="blutoc.gif" WIDTH = 32 HEIGHT = 32 BORDER = 0 ALT="TOC"></A>

<A HREF="unx23.htm"><IMG SRC="blunext.gif" WIDTH = 32 HEIGHT = 32 BORDER = 0 ALT="Next Page"></A>

<A HREF="index.htm"><IMG SRC="bluprev.gif" WIDTH = 32 HEIGHT = 32 BORDER = 0 ALT="Home"></A>

</P></BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -