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