]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - share/doc/usd/22.trofftut/tt03
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / share / doc / usd / 22.trofftut / tt03
1 .\" This module is believed to contain source code proprietary to AT&T.
2 .\" Use and redistribution is subject to the Berkeley Software License
3 .\" Agreement and your Software Agreement with AT&T (Western Electric).
4 .\"
5 .\"     @(#)tt03        8.1 (Berkeley) 6/8/93
6 .\" Copyright (C) Caldera International Inc. 2001-2002.  All rights reserved.
7 .\" 
8 .\" Redistribution and use in source and binary forms, with or without
9 .\" modification, are permitted provided that the following conditions are
10 .\" met:
11 .\" 
12 .\" Redistributions of source code and documentation must retain the above
13 .\" copyright notice, this list of conditions and the following
14 .\" disclaimer.
15 .\" 
16 .\" Redistributions in binary form must reproduce the above copyright
17 .\" notice, this list of conditions and the following disclaimer in the
18 .\" documentation and/or other materials provided with the distribution.
19 .\" 
20 .\" All advertising materials mentioning features or use of this software
21 .\" must display the following acknowledgement:
22 .\" 
23 .\" This product includes software developed or owned by Caldera
24 .\" International, Inc.  Neither the name of Caldera International, Inc.
25 .\" nor the names of other contributors may be used to endorse or promote
26 .\" products derived from this software without specific prior written
27 .\" permission.
28 .\" 
29 .\" USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA
30 .\" INTERNATIONAL, INC.  AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR
31 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
32 .\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
33 .\" DISCLAIMED.  IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE
34 .\" FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR
35 .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
36 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
37 .\" BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
38 .\" WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
39 .\" OR OTHERWISE) RISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
40 .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
41 .\" 
42 .\" $FreeBSD$
43 .\"
44 .NH
45 Fonts and Special Characters
46 .PP
47 .UL troff
48 and the typesetter allow four different fonts at any one time.
49 Normally three fonts (Times roman, italic and bold) and one collection of special characters
50 are permanently
51 mounted.
52 .P1 2
53 .ft R
54 abcdefghijklmnopqrstuvwxyz 0123456789
55 ABCDEFGHIJKLMNOPQRSTUVWXYZ
56 .ft I
57 abcdefghijklmnopqrstuvwxyz 0123456789
58 ABCDEFGHIJKLMNOPQRSTUVWXYZ
59 .ft B
60 abcdefghijklmnopqrstuvwxyz 0123456789
61 ABCDEFGHIJKLMNOPQRSTUVWXYZ
62 .ft R
63 .P2
64 The
65 greek, mathematical symbols and miscellany
66 of the special font are
67 listed in Appendix A.
68 .PP
69 .UL troff
70 prints in roman unless told otherwise.
71 To switch into bold, use
72 the
73 .BD .ft
74 command
75 .P1
76 ^ft B
77 .P2
78 and for italics,
79 .P1
80 ^ft I
81 .P2
82 To return to roman, use
83 .BD .ft\ R ;
84 to return to the previous font,
85 whatever it was,
86 use either
87 .BD .ft\ P
88 or just
89 .BD .ft  .
90 The `underline' command
91 .P1
92 ^ul
93 .P2
94 causes the next input line to print in italics.
95 .BD .ul
96 can be followed by a count to
97 indicate that more than one line is to be italicized.
98 .PP
99 Fonts can also be changed within a line or word
100 with the in-line command
101 .BD \ef :
102 .P1
103 \fBbold\fIface\fR text
104 .P2
105 is produced by
106 .P1
107 \efBbold\efIface\efR text
108 .P2
109 If you want to do this so the previous font, whatever it was,
110 is left undisturbed, insert extra
111 .BD \efP
112 commands, like this:
113 .P1
114 \efBbold\efP\efIface\efP\efR text\efP
115 .P2
116 Because only the immediately previous font is remembered,
117 you have to restore the previous font after each change
118 or you can lose it.
119 The same is true of 
120 .BD .ps
121 and
122 .BD .vs
123 when used without an argument.
124 .PP
125 There are other fonts available besides the standard set,
126 although you can still use only four at any given time.
127 The command
128 .BD .fp
129 tells
130 .UL troff
131 what fonts are physically mounted on the typesetter:
132 .P1
133 ^fp 3 H
134 .P2
135 says that the Helvetica font is mounted on position 3.
136 (The complete list of font sizes and styles depends on
137 your typesetter or laser printer.)
138 Appropriate
139 .BD .fp
140 commands should appear at the beginning of your document
141 if you do not use the standard fonts.
142 .PP
143 It is possible to make a document relatively independent
144 of the actual fonts used to print it
145 by using font numbers instead of names;
146 for example,
147 .BD \ef3
148 and
149 .BD .ft\ 3
150 mean `whatever font is mounted at position 3',
151 and thus work for any setting.
152 Normal settings are roman font on 1, italic on 2,
153 bold on 3,
154 and special on 4.
155 .PP
156 There is also a way to get `synthetic' bold fonts
157 by overstriking letters with a slight offset.
158 Look at the
159 .BD .bd
160 command in [1].
161 .WS
162 .PP
163 Special characters have four-character names beginning with
164 .BD \e( ,
165 and they may be inserted anywhere.
166 For example,
167 .P1
168 \(14 + \(12 = \(34
169 .P2
170 is produced by
171 .P1
172 \e(14 + \e(12 = \e(34
173 .P2
174 In particular,
175 greek letters are all of the form
176 .BD  \e(*\- ,
177 where
178 .BD \-
179 is an upper or lower case roman letter
180 reminiscent of the greek.
181 Thus
182 to get
183 .P1
184 \(*S(\(*a\(mu\(*b) \(-> \(if
185 .P2
186 in bare
187 .UL troff
188 we have to type
189 .P1
190 \e(*S(\e(*a\e(mu\e(*b) \e(\(mi> \e(if
191 .P2
192 That line is unscrambled as follows:
193 .P1
194 .ta 1i 2i 3i
195 \e(*S   \(*S
196 (       (
197 \e(*a   \(*a
198 \e(mu   \(mu
199 \e(*b   \(*b
200 )       )
201 \e(\(mi>        \(->
202 \e(if   \(if
203 .P2
204 A complete list of these special names occurs in Appendix A.
205 .PP
206 In
207 .UL eqn 
208 [2]
209 the same effect can be achieved with the input
210 .P1
211 SIGMA ( alpha times beta ) \-> inf
212 .P2
213 which is less concise, but clearer to the uninitiated.
214 .PP
215 Notice that
216 each
217 four-character name is a single character
218 as far as
219 .UL troff
220 is concerned _
221 the
222 `translate' command
223 .P1
224 ^tr \e(mi\e(em
225 .P2
226 is perfectly clear, meaning
227 .P1
228 ^tr \(mi\(em
229 .P2
230 that is, to translate \(mi into \(em.
231 .PP
232 Some characters are automatically translated into others:
233 grave  \(ga  and acute  \(aa  accents (apostrophes) become open and close single quotes
234 `\|'\|;
235 the combination of ``...'' is generally preferable to the double quotes "...".
236 Similarly a typed minus sign becomes a hyphen -.
237 To print an explicit \- sign, use
238 .BD \e\|- .
239 To get a backslash printed, use
240 .BD \ee .