0238-0241.html
来自「linux-unix130.linux.and.unix.ebooks130 l」· HTML 代码 · 共 569 行 · 第 1/2 页
HTML
569 行
<HTML>
<HEAD>
<TITLE>Linux Complete Command Reference:User Commands:EarthWeb Inc.-</TITLE>
</HEAD>
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<SCRIPT>
<!--
function displayWindow(url, width, height) {
var Win = window.open(url,"displayWindow",'width=' + width +
',height=' + height + ',resizable=1,scrollbars=yes');
}
//-->
</SCRIPT>
</HEAD>
-->
<!-- ISBN=0672311046 //-->
<!-- TITLE=Linux Complete Command Reference//-->
<!-- AUTHOR=Red Hat//-->
<!-- PUBLISHER=Macmillan Computer Publishing//-->
<!-- IMPRINT=Sams//-->
<!-- CHAPTER=01 //-->
<!-- PAGES=0001-0736 //-->
<!-- UNASSIGNED1 //-->
<!-- UNASSIGNED2 //-->
<P><CENTER>
<a href="0235-0237.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="0242-0242.html">Next</A></CENTER></P>
<A NAME="PAGENUM-238"><P>Page 238</P></A>
<P><B>
DESCRIPTION
</B>
</P>
<P>This manual page describes the GNU version of
troff, which is part of the groff document formatting system. It is
highly compatible with UNIX troff. Usually, it should be invoked using the
groff command, which will also run preprocessors
and postprocessors in the appropriate order and with the appropriate options.
</P>
<P><B>
OPTIONS
</B>
</P>
<TABLE>
<TR><TD>
_a
</TD><TD>
Generate an ASCII approximation of the typeset output.
</TD></TR><TR><TD>
_b
</TD><TD>
Print a backtrace with each warning or error message. This backtrace should help track down the cause
of the error. The line numbers given in the backtrace may not always correct:
troff's idea of line numbers gets confused by as or
am requests.
</TD></TR><TR><TD>
_i
</TD><TD>
Read the standard input after all the named input files have been processed.
</TD></TR><TR><TD>
_v
</TD><TD>
Print the version number.
</TD></TR><TR><TD>
_wname
</TD><TD>
Enable warning name. Available warnings are described in the "Warnings" subsection as follows. Multiple <BR>
_w options are allowed.
</TD></TR><TR><TD>
_Wname
</TD><TD>
Inhibit warning name. Multiple _W options are allowed.
</TD></TR><TR><TD>
_E
</TD><TD>
Inhibit all error messages.
</TD></TR><TR><TD>
_z
</TD><TD>
Suppress formatted output.
</TD></TR><TR><TD>
_C
</TD><TD>
Enable compatibility mode.
</TD></TR><TR><TD>
_dcs, _dname=s
</TD><TD>
Define c or name to be a string
s; c must be a one-letter name.
</TD></TR><TR><TD>
_ffam
</TD><TD>
Use fam as the default font family.
</TD></TR><TR><TD>
_mname
</TD><TD>
Read in the file tmac.name. Normally, this will be searched for in
/usr/lib/groff/tmac.
</TD></TR><TR><TD>
_R
</TD><TD>
Don't load troffrc.
</TD></TR><TR><TD>
_nnum
</TD><TD>
Number the first page num.
</TD></TR><TR><TD>
_olist
</TD><TD>
Output only pages in list, which is a comma-separated list of page ranges;
n means print page n, m_n means print every page between
m and n, _n means print every page up to n, n_ means print every
page from n. Troff will exit after printing the last page in the list.
</TD></TR><TR><TD>
_rcn, _rname=n
</TD><TD>
Set number register c or
name to n; c must be a one-character name; n can be any
troff numeric expression.
</TD></TR><TR><TD>
_Tname
</TD><TD>
Prepare output for device name, rather than the default
ps.
</TD></TR><TR><TD>
_Fdir
</TD><TD>
Search dir for subdirectories devname
(name is the name of the device) for the DESC file and font files
before the normal /usr/lib/groff/font.
</TD></TR><TR><TD>
_Mdir
</TD><TD>
Search directory dir for macro files before the normal
/usr/lib/groff/tmac.
</TD></TR></TABLE>
<P><B>
USAGE
</B>
</P>
<P>Only the features not in UNIX troff are described here.
</P>
<P><B>
LONG NAMES
</B>
</P>
<P>The names of number registers, fonts,
strings/macros/diversions, special characters can be of any length. In
escape sequences, where you can use (xx for a two-character name, you can use
[xxx] for a name of arbitrary length:
</P>
<TABLE>
<TR><TD>
\[xxx]
</TD><TD>
Print the special character called
xxx.
</TD></TR><TR><TD>
\f[xxx]
</TD><TD>
Set font xxx.
</TD></TR><TR><TD>
\*[xxx]
</TD><TD>
Interpolate string xxx.
</TD></TR><TR><TD>
\n[xxx]
</TD><TD>
Interpolate number register xxx.
</TD></TR></TABLE>
<H4><A NAME="ch01_ 106">
FRACTIONAL POINT SIZES
</A></H4>
<P>A scaled point is equal to 1/sizescale points, where sizescale is specified in the
DESC file (1 by default.) There is a new scale indicator
z that has the effect of multiplying by sizescale. Requests and escape sequences in
troff interpret arguments that represent a point size as being in units of scaled points, but they evaluate each such argument using a default scale
indicator
</P>
<A NAME="PAGENUM-239"><P>Page 239</P></A>
<P>of z. Arguments treated in this way are the argument to the
ps request, the third argument to the cs request, the second
and fourth arguments to the tkf request, the argument to the
\H escape sequence, and those variants of the \s escape
sequence that take a numeric expression as their argument.
</P>
<P>For example, suppose sizescale is 1,000; then a scaled point will be equivalent to a millipoint; the request
.ps 10.25 is equivalent to .ps 10.25z, and so sets the point size to 10,250 scaled points, which is equal to 10.25 points.
</P>
<P>The number register \n(.s returns the point size in points as decimal fraction. There is also a new number register
\n[.ps] that returns the point size in scaled points.
</P>
<P>It would make no sense to use the z scale indicator in a numeric expression whose default scale indicator was neither
u nor z, and so troff disallows this. Similarly, it would make no sense to use a scaling indicator other than
z or u in a numeric expression whose default scale indicator was
z, and so troff disallows this as well.
</P>
<P>There is also new scale indicator s that multiplies by the number of units in a scaled point. So, for example,
\n[.ps]s is equal to 1m. Be sure not to confuse the
s and z scale indicators.
</P>
<P><B>
NUMERIC ESPRESSIONS
</B>
</P>
<P>Spaces are permitted in a number expression within parentheses.
</P>
<P>M indicates a scale of hundredths of an em.
</P>
<TBL>
<COLS=2>
<C>
e1>?e2
<C>
The maximum of e1 and e2.
<C>
e1<?e2
<C>
The minimum of e1 and e2.
<C>
(c;e)
<C>
Evaluate e using c as the default scaling indicator. If
c is missing, ignore scaling indicators in the
evaluation of e.
</P>
<P><B>
NEW ESCAPE SEQUENCES
</B>
</P>
<TABLE>
<TR><TD>
\A'anything'
</TD><TD>
This expands to 1 or 0 according to whether
anything is or is not acceptable as the name of a
string, macro, diversion, number register, environment, or font. It will return
0 if anything is empty. This is useful if you want to look up user input in some sort of associative table.
</TD></TR><TR><TD>
\C'xxx'
</TD><TD>
Typeset character named xxx. Normally it is more convenient to
use \[xxx]. But \C has the advantage that it is compatible with recent versions of UNIX and is available in
compatibility mode.
</TD></TR><TR><TD>
\E
</TD><TD>
This is equivalent to an escape character, but it's not interpreted in copy mode. For
example, strings to start and end superscripting could be defined like this:
<!-- CODE SNIP //-->
<PRE>
.ds { \v'_.3m'\s'\En[.s]*6u/10u'
.ds { \s0\v'.3m'
</PRE>
<!-- END CODE SNIP //-->
</TD></TR></TABLE>
<P>The use of \E ensures that these definitions will work even if
\*f gets interpreted in copy-mode (for example, by being
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?