0238-0241.html

来自「linux-unix130.linux.and.unix.ebooks130 l」· HTML 代码 · 共 569 行 · 第 1/2 页

HTML
569
字号
used in a macro argument).

</P>



<TABLE>



<TR><TD>

\N'n'

</TD><TD>

Typeset the character with code n in the current font.

n can be any integer. Most devices only have characters with codes between 0 and 255. If the current font does not contain a character with

that code, special fonts will not be searched. The

\N escape sequence can be conveniently used on conjunction with the

char request:

</TD></TR><TR><TD>

</TD><TD>

.char \[phone] \f(ZDnN'37'

</TD></TR><TR><TD>

</TD><TD>

The code of each character is given in the fourth column in the font description file after

the charset command. It is possible to include unnamed characters in the font description file by

using a name of &#151;; the \N escape sequence is the only way to use these.

</TD></TR><TR><TD>

\R'namen'

</TD><TD>

This has the same effect as

.nrnamen

</TD></TR><TR><TD>

\s(nn

</TD><TD>

Set the point size to nn points; nn must be exactly two digits.

</TD></TR><TR><TD>

\s[n], \s'n'

</TD><TD>

Set the point size to n scaled points;

n is a numeric expression with a default scale indicator of

z.

</TD></TR><TR><TD>

\Vx\V(xx \V[xxx]

</TD><TD>

Interpolate the contents of the environment variable

xxx, as returned by getenv(3). \V is interpreted in copy-mode.

</TD></TR></TABLE>



<A NAME="PAGENUM-240"><P>Page 240</P></A>



<TABLE>



<TR><TD>

\Yx\Y(xx \Y[xxx]

</TD><TD>

This is approximately equivalent to

\X'\*[xxx]'. However, the contents of the string or macro

xxx are not interpreted; also, it is permitted for

xxx to have been defined as a macro and thus

contain newlines (it is not permitted for the argument to

\X to contain newlines). The inclusion of newlines requires an extension to the UNIX

troff output format and will confuse drivers that do not

know about this extension.

</TD></TR><TR><TD>

\Z'anything'

</TD><TD>

Print anything and then restore the horizontal and vertical position;

anything may not contain tabs or leaders.

</TD></TR><TR><TD>

\$0

</TD><TD>

The name by which the current macro was invoked. The

als request can make a macro have more than one name.

</TD></TR><TR><TD>

\$*

</TD><TD>

In a macro, the concatenation of all the arguments separated by spaces.

</TD></TR><TR><TD>

\$@

</TD><TD>

In a macro, the concatenation of all the arguments with each surrounded by double quotes,

and separated by spaces.

</TD></TR><TR><TD>

\$( nn, \$[ nnn ]

</TD><TD>

In a macro, this gives the

nnth or nnnth argument. Macros can have an unlimited number

of arguments.

</TD></TR><TR><TD>

\?anything\?

</TD><TD>

When used in a diversion, this will transparently embed

anything in the diversion. anything is read in copy mode. When the diversion is reread,

anything will be interpreted. anything may not

contain newlines; use \! if you want to embed newlines in a diversion. The escape sequence

\? is also recognized in copy mode and turned into a single internal code; it is this code that

terminates anything. Thus

<!-- CODE //-->

<PRE>

.nr x 1

.nf

.di d

\?\\?\\\\?\\\\\\\\nx\\\\?\\?\?

.di

.nr x 2

.di e

.d

.di

.nr x 3

.di f

.e

.di

.nr x 4

.f

</PRE>

<!-- END CODE //-->

</TD></TR><TR><TD>

</TD><TD>

will print 4.

</TD></TR><TR><TD>

\/

</TD><TD>

This increases the width of the preceding character so that the spacing between that character

and the following character will be correct if the following character is a Roman character. For

example, if an italic f is immediately followed by a Roman right parenthesis, then in many fonts the top

right portion of the f will overlap the top left of the right parenthesis, producing

f), which is ugly. Inserting \/ produces and avoids this problem. It is a good idea to use this escape

sequence whenever an italic character is immediately followed by a Roman character without any

intervening space.

</TD></TR><TR><TD>

\,

</TD><TD>

This modifies the spacing of the following character so that the spacing between that character

and the preceding character will correct if the preceding character is a Roman character. For

example, inserting \, between the parenthesis and the

f changes to (f. It is a good idea to use this

escape sequence whenever a Roman character is immediately followed by an italic character without

any intervening space.

</TD></TR><TR><TD>

\)

</TD><TD>

Like \&amp; except that it behaves like a character declared with the

cflags request to be transparent for the purposes of end-of-sentence recognition.

</TD></TR><TR><TD>

\~

</TD><TD>

This produces an unbreakable space that stretches like a normal interword space when a line

is adjusted.

</TD></TR><TR><TD>

\#

</TD><TD>

Everything up to and including the next newline is ignored. This is interpreted in copy mode.

This is like \% except that \% does not ignore the terminating newline.

</TD></TR></TABLE>



<A NAME="PAGENUM-241"><P>Page 241</P></A>





<P><B>

NEW REQUESTS

</B>

</P>

<TABLE>



<TR><TD>

.alnxxyy

</TD><TD>

Create an alias xx for number register object named

yy. The new name and the old name will be exactly equivalent. If

yy is undefined, a warning of type reg will be generated, and the request

will be ignored.

</TD></TR><TR><TD>

.alsxxyy

</TD><TD>

Create an alias xx for request, string, macro, or diversion object named

yy. The new name and the old name will be exactly equivalent (it is similar to a hard rather than a soft link). If

yy is undefined, a warning of type mac will be generated, and the request will be ignored. The

de, am, di, da, ds, and as requests only create a new object if the name of the macro, diversion, or string

diversion is currently undefined or if it is defined to be a request; normally, they modify the value of

an existing object.

</TD></TR><TR><TD>

.asciifyxx

</TD><TD>

This request only exists in order to make it possible to make certain gross hacks work with

GNU troff. It unformats the diversion xx in such a way that ASCII characters that were formatted

and diverted into xx will be treated like ordinary input characters when

xx is reread. For example, this:

<!-- CODE //-->

<PRE>

.tr @.

.di x

@nr\n\1

.br

.di

.tr @@

.asciify x

.x

</PRE>

<!-- END CODE //-->

</TD></TR><TR><TD>

</TD><TD>

will set register n to 1.

</TD></TR><TR><TD>

.backtrace

</TD><TD>

Print a backtrace of the input stack on

stderr.

</TD></TR><TR><TD>

.break

</TD><TD>

Break out of a while loop. See also the

while and continue requests. Be sure not to confuse this

with the br request.

</TD></TR><TR><TD>

.cflagsnc1c2...

</TD><TD>

Characters c1, c2, ... have properties determined by

n, which is ORed from the following.

</TD></TR><TR><TD>

1

</TD><TD>

The character ends sentences. (Initially, characters

.?! have this property.)

</TD></TR><TR><TD>

2

</TD><TD>

Lines can be broken before the character (initially, no characters have this property); a line will

not be broken at a character with this property unless the characters on each side both have

nonzero hyphenation codes.

</TD></TR><TR><TD>

4

</TD><TD>

Lines can be broken after the character (initially, characters

_\(hy\(em have this property); a line will not be broken at a character with this property unless the characters on each side both

have nonzero hyphenation codes.

</TD></TR><TR><TD>

8

</TD><TD>

The character overlaps horizontally (initially, characters

\(ul\(rn\(ru have this property).

</TD></TR><TR><TD>

16

</TD><TD>

The character overlaps vertically (initially, character

\(br has this property).

</TD></TR><TR><TD>

32

</TD><TD>

An end-of-sentence character followed by any number of characters with this property will

be treated as the end of a sentence if followed by a newline or two spaces; in other words, the

character is transparent for the purposes of end-of-sentence recognition; this is the same as having a

zero space factor in TeX (initially, characters

`)]*\(dg\(rq have this property).

</TD></TR><TR><TD>

.charcstring

</TD><TD>

Define character c to be

string. Every time character c needs to be printed,

string will be processed in a temporary environment and the result will be wrapped up into a single object.

Compatibility mode will be turned off and the escape character will be set to

\ while string is being processed. Any emboldening, constant spacing, or track kerning will be applied to this object rather than

to individual characters in string. A character defined by this request can be used just like a

normal character provided by the output device. In particular, other characters can be translated to it

with the tr request; it can be made the leader character by the

lc request; repeated patterns can be drawn with the character by using the

\l and \L escape sequences; words containing the character can

be hyphenated correctly, if the hcode request is used to give the character a hyphenation code. There

is a special antirecursion feature: Use of character within the character's definition will be

handled like normal characters not defined with

char. A character definition can be removed with the

rchar request.

</TD></TR></TABLE>







<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>







</td>
</tr>
</table>

<!-- begin footer information -->







</body></html>

⌨️ 快捷键说明

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