PageRenderTime 28ms CodeModel.GetById 17ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 0ms

/share/doc/usd/22.trofftut/tt02

https://bitbucket.org/freebsd/freebsd-head/
#! | 244 lines | 244 code | 0 blank | 0 comment | 0 complexity | a65380c5fcfe6a8c2e195695d4c00c21 MD5 | raw file
  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.\"	@(#)tt02	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
 45Point Sizes; Line Spacing
 46.PP
 47As mentioned above,
 48the command
 49.BD .ps
 50sets the point size.
 51One point is 1/72 inch,
 52so 6-point characters are at most 1/12 inch high,
 53and 36-point characters are \(12 inch.
 54There are 15 point sizes, listed below.
 55.P1 1
 56.ps 6
 576 point: Pack my box with five dozen liquor jugs.
 58.ps 7
 59.vs 8p
 607 point: Pack my box with five dozen liquor jugs.
 61.vs 9p
 62.ps 8
 638 point: Pack my box with five dozen liquor jugs.
 64.vs 10p
 65.ps 9
 669 point: Pack my box with five dozen liquor jugs.
 67.vs 11p
 68.ps 10
 6910 point: Pack my box with five dozen liquor
 70.vs 12p
 71.ps 11
 7211 point: Pack my box with five dozen 
 73.vs 14p
 74.ps 12
 7512 point: Pack my box with five dozen
 76.vs 16p
 77.ps 14
 7814 point: Pack my box with five
 79.vs 24p
 80\s1616 point\s18 18 point\s20 20 point
 81.vs 40p
 82\s2222\s24 24\s28 28\s36 36
 83.ps 10
 84.vs 12p
 85.P2
 86.PP
 87If the number after
 88.BD .ps 
 89is not one of these
 90legal sizes,
 91it is rounded up to the next valid value,
 92with a maximum of 36.
 93If no number follows
 94.BD .ps ,
 95.UL troff
 96reverts to the previous size, whatever it was.
 97.UL troff
 98begins with point size 10,
 99which is usually fine.
100The original of this document (on 8.5 by 11 inch paper) is in 9 point.
101.PP
102The point size can also be changed in the middle of a line
103or even a word
104with the in-line command
105.BD \es .
106To produce
107.P1
108\s8UNIX\s10 runs on a \s8PDP-\s1011/45
109.P2
110type
111.P1
112\es8UNIX\es10 runs on a \es8PDP-\es1011/45
113.P2
114As above,
115.BD \es 
116should be followed by a legal point size,
117except that
118.BD \es0 
119causes the size to revert to
120its previous value.
121Notice that
122.BD \es1011
123can be understood correctly as `size 10, followed by an 11', if the size is legal,
124but not otherwise.
125Be cautious with similar constructions.
126.PP
127Relative size changes are also legal and useful:
128.P1
129\es\-2UNIX\es+2
130.P2
131temporarily decreases the size, whatever it is, by two points, then
132restores it.
133Relative size changes have the advantage that the size difference
134is independent of the starting size of the document.
135The amount of the relative change is restricted
136to a single digit.
137.WS
138.PP
139The other parameter that determines what the type looks like
140is the spacing between lines,
141which is set independently of the point size.
142Vertical spacing is measured from the bottom of one line to
143the bottom of the next.
144The command to control vertical spacing is
145.BD .vs .
146For running text, it is usually best to set the vertical spacing
147about 20% bigger than the character size.
148For example, so far in this document, we have used
149``9 on 11'', that is,
150.P1
151^ps 9
152^vs 11p
153.P2
154If we changed to
155.P1
156^ps 9
157^vs 9p
158.P2
159.vs 9p
160.ne 3
161the running text would look like this.
162After a few lines, you will agree it looks a little cramped.
163The right vertical spacing is partly a matter of taste, depending on how
164much text you want to squeeze into a given space,
165and partly a matter of traditional printing style.
166By default,
167.UL troff
168uses 10 on 12.
169.PP
170.vs 14p
171.ps 12
172Point size and vertical spacing make a substantial difference in the amount of text
173per square inch.
174This is 12 on 14.
175.ne 2
176.PP
177.ne 2
178.ps 6
179.vs 7p
180Point size and vertical spacing make a substantial difference in the amount of text
181per square inch.
182For example,
18310 on 12 uses about twice as much space as 7 on 8.
184This is 6 on 7, which is even smaller.
185It packs a lot more words per line,
186but you can go blind trying to read it.
187.PP
188When used without arguments,
189.BD .ps
190and
191.BD .vs
192revert to the previous size and vertical spacing
193respectively.
194.WS
195.PP
196The command
197.BD .sp
198is used to get extra vertical space.
199Unadorned, 
200it gives you one extra blank line (one
201.BD .vs ,
202whatever that has been set to).
203Typically, that's more or less than you want,
204so
205.BD .sp
206can be followed by
207information about how much space you want _
208.P1
209^sp 2i
210.P2
211means `two inches of vertical space'.
212.P1
213^sp 2p
214.P2
215means `two points of vertical space';
216and
217.P1
218^sp 2
219.P2
220means `two vertical spaces' _ two of whatever
221.BD .vs
222is set to
223(this can also be made explicit with
224.BD .sp\ 2v );
225.UL troff
226also understands decimal fractions in most places,
227so
228.P1
229^sp 1.5i
230.P2
231is a space of 1.5 inches.
232These same scale factors can be used after
233.BD .vs
234to define line spacing, and in fact after most commands
235that deal with physical dimensions.
236.PP
237It should be noted that all size numbers are converted internally
238to `machine units', which are 1/432 inch
239(1/6 point).
240For most purposes, this is enough resolution
241that you don't have to worry about the accuracy of the representation.
242The situation is not quite so good vertically,
243where resolution is 1/144 inch
244(1/2 point).