troff
and the typesetter allow four different fonts at any one time.
Normally three fonts (Times roman, italic and bold) and one collection of special characters
are permanently
mounted.
abcdefghijklmnopqrstuvwxyz 0123456789
ABCDEFGHIJKLMNOPQRSTUVWXYZ
abcdefghijklmnopqrstuvwxyz 0123456789
ABCDEFGHIJKLMNOPQRSTUVWXYZ
abcdefghijklmnopqrstuvwxyz 0123456789
ABCDEFGHIJKLMNOPQRSTUVWXYZ
The
greek, mathematical symbols and miscellany
of the special font are
listed in Appendix A.
troff
prints in roman unless told otherwise.
To switch into bold, use
the
.ftcommand
^ft B
and for italics,
^ft I
To return to roman, use
.ft Rto return to the previous font,
whatever it was,
use either
.ft Por just
.ftThe `underline' command
^ul
causes the next input line to print in italics.
.ulcan be followed by a count to
indicate that more than one line is to be italicized.
Fonts can also be changed within a line or word
with the in-line command
\fboldface text
is produced by
\fBbold\fIface\fR text
If you want to do this so the previous font, whatever it was,
is left undisturbed, insert extra
\fPcommands, like this:
\fBbold\fP\fIface\fP\fR text\fP
Because only the immediately previous font is remembered,
you have to restore the previous font after each change
or you can lose it.
The same is true of
.psand
.vswhen used without an argument.
There are other fonts available besides the standard set,
although you can still use only four at any given time.
The command
.fptells
troff
what fonts are physically mounted on the typesetter:
^fp 3 H
says that the Helvetica font is mounted on position 3.
(For a complete list of fonts and what they look like,
see the
troff
manual.)
Appropriate
.fpcommands should appear at the beginning of your document
if you do not use the standard fonts.
It is possible to make a document relatively independent of the actual fonts used to print it by using font numbers instead of names; for example, \f3and .ft~3mean `whatever font is mounted at position 3', and thus work for any setting. Normal settings are roman font on 1, italic on 2, bold on 3, and special on 4.
There is also a way to get `synthetic' bold fonts by overstriking letters with a slight offset. Look at the .bdcommand in [1].
Special characters have four-character names beginning with
\(and they may be inserted anywhere.
For example,
¼ + ½ = ¾
is produced by
\(14 + \(12 = \(34
In particular,
greek letters are all of the form
\(*-where
-is an upper or lower case roman letter
reminiscent of the greek.
Thus
to get
(×) -> \(if
in bare
troff
we have to type
\(*S(\(*a\(mu\(*b) \(-> \(if
That line is unscrambled as follows:
\(*S
( (
\(*a
\(mu ×
\(*b
) )
\(-> ->
\(if \(if
A complete list of these special names occurs in Appendix A.
In
eqn
[2]
the same effect can be achieved with the input
SIGMA ( alpha times beta ) -> inf
which is less concise, but clearer to the uninitiated.
Notice that
each
four-character name is a single character
as far as
troff
is concerned _
the
`translate' command
^tr \(mi\(em
is perfectly clear, meaning
^tr ---
that is, to translate - into --.
Some characters are automatically translated into others: grave ` and acute ' accents (apostrophes) become open and close single quotes `~'; the combination of ``...'' is generally preferable to the double quotes "...". Similarly a typed minus sign becomes a hyphen -. To print an explicit - sign, use \-To get a backslash printed, use \e