home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / bsd_srcs / usr.bin / groff / doc / meintro.me < prev    next >
Encoding:
Text File  |  1991-04-30  |  40.3 KB  |  2,248 lines

  1. .\" Copyright (c) 1986 The Regents of the University of California.
  2. .\" All rights reserved.
  3. .\"
  4. .\" Redistribution and use in source and binary forms are permitted
  5. .\" provided that the above copyright notice and this paragraph are
  6. .\" duplicated in all such forms and that any documentation,
  7. .\" advertising materials, and other materials related to such
  8. .\" distribution and use acknowledge that the software was developed
  9. .\" by the University of California, Berkeley.  The name of the
  10. .\" University may not be used to endorse or promote products derived
  11. .\" from this software without specific prior written permission.
  12. .\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
  13. .\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
  14. .\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  15. .\"
  16. .\"    @(#)intro.me    6.4 (Berkeley) 7/17/89
  17. .\"
  18. .\" Modified for groff by jjc@jclark.uucp.
  19. .\"UC 7
  20. .ll 6.5i
  21. .lt 6.5i
  22. .pn 0
  23. .ds MO @VERSION@
  24. .nr si 3n
  25. .he 'USING GROFF AND \-ME''%'
  26. .\"eh 'USD:22-%''Writing Papers with NROFF using \-me'
  27. .\"oh 'Writing Papers with NROFF using \-me''USD:22-%'
  28. .ds U \s-1UNIX\s0
  29. .ds N \s-1NROFF\s0
  30. .ds T \s-1TROFF\s0
  31. .ds G \s-1GROFF\s0
  32. .+c
  33. .(l C
  34. .sz 14
  35. .b "Writing Papers with GROFF using \-me"
  36. .sz
  37. .sp 2
  38. .ul
  39. Eric P. Allman*
  40. .(f
  41. *Author's current address:
  42. Britton Lee, Inc.,
  43. 1919 Addison Suite 105,
  44. Berkeley, California 94704.
  45. .)f
  46. .sp
  47. Project INGRES
  48. Electronics Research Laboratory
  49. University of California, Berkeley
  50. Berkeley, California  94720
  51. .sp 2
  52. .i "Modified for \*G by James Clark"
  53. .)l
  54. .sp 4
  55. .pp
  56. This document describes
  57. the text processing facilities
  58. available on the \*U\(dg
  59. .(f
  60. \(dg\*U is a trademark
  61. of AT&T Bell Laboratories
  62. .)f
  63. operating system
  64. via \*G and the
  65. \-me
  66. macro package.
  67. It is assumed
  68. that the reader
  69. already is generally familiar
  70. with the \*U operating system
  71. and a text editor
  72. such as
  73. .b ex .
  74. This is intended to be a casual introduction,
  75. and
  76. as such not all material is covered.
  77. In particular,
  78. many variations and additional features
  79. of the \-me macro package
  80. are not explained.
  81. For a complete discussion of this
  82. and other issues,
  83. see
  84. .ul
  85. The \-me Reference Manual
  86. and
  87. .ul
  88. The \*N/\*T Reference Manual.
  89. .pp
  90. \*G, a computer program
  91. that runs on the \*U operating system,
  92. reads an input file
  93. prepared by the user
  94. and outputs a formatted paper
  95. suitable for publication or framing.
  96. The input consists of
  97. .i text ,
  98. or words to be printed,
  99. and
  100. .i requests ,
  101. which give instructions
  102. to the \*G program
  103. telling how to format the printed copy.
  104. .pp
  105. Section 1
  106. describes the basics
  107. of text processing.
  108. Section 2
  109. describes the basic requests.
  110. Section 3
  111. introduces displays.
  112. Annotations,
  113. such as footnotes,
  114. are handled in
  115. section 4.
  116. The more complex requests
  117. which are not discussed in section 2
  118. are covered in section 5.
  119. Finally,
  120. section 6
  121. discusses things you will need
  122. to know
  123. if you want to typeset documents.
  124. If you are a novice,
  125. you probably won't want to read beyond section 4
  126. until you have tried some of the basic features out.
  127. .pp
  128. When you have your raw text ready,
  129. call the \*G formatter by typing
  130. as a request to the \*U shell:
  131. .(b
  132. groff \-me \-T\c
  133. .i "type files"
  134. .)b
  135. where
  136. .i type
  137. describes the type of
  138. output device you are using.
  139. A complete description of options
  140. to the \*G command can be found in
  141. .b groff (1).
  142. .pp
  143. The word
  144. .i argument
  145. is used in this manual
  146. to mean a word or number
  147. which appears on the same line
  148. as a request
  149. which modifies the meaning
  150. of that request.
  151. For example,
  152. the request
  153. .(b
  154. \&.sp
  155. .)b
  156. spaces one line,
  157. but
  158. .(b
  159. \&.sp 4
  160. .)b
  161. spaces four lines.
  162. The number
  163. .b 4
  164. is an
  165. .i argument
  166. to the
  167. .b .sp
  168. request
  169. which says to space four lines
  170. instead of one.
  171. Arguments are separated from the request
  172. and from each other
  173. by spaces.
  174. .sh 1 "Basics of Text Processing"
  175. .pp
  176. The primary function
  177. of \*G
  178. is to
  179. .i collect
  180. words from input lines,
  181. .i fill
  182. output lines with those words,
  183. .i justify
  184. the right hand margin by inserting extra spaces
  185. in the line,
  186. and output the result.
  187. For example,
  188. the input:
  189. .(b
  190. Now is the time
  191. for all good men
  192. to come to the aid
  193. of their party.
  194. Four score and seven
  195. years ago,...
  196. .)b
  197. will be read,
  198. packed onto output lines,
  199. and justified
  200. to produce:
  201. .(b F
  202. Now is the time
  203. for all good men
  204. to come to the aid
  205. of their party.
  206. Four score and seven
  207. years ago,...
  208. .)b
  209. Sometimes you may want to start a new output line
  210. even though the line you are on
  211. is not yet full;
  212. for example,
  213. at the end of a paragraph.
  214. To do this
  215. you can cause a
  216. .i break ,
  217. which
  218. starts a new output line.
  219. Some requests
  220. cause a break automatically,
  221. as do blank input lines
  222. and input lines beginning with a space.
  223. .pp
  224. Not all input lines
  225. are text to be formatted.
  226. Some of the input lines
  227. are
  228. .i requests
  229. which describe
  230. how to format the text.
  231. Requests always have a period
  232. or an apostrophe
  233. (\c
  234. .q "\|\(aa\|" )
  235. as the first character
  236. of the input line.
  237. .pp
  238. The text formatter
  239. also does more complex things,
  240. such as automatically numbering pages,
  241. skipping over page folds,
  242. putting footnotes in the correct place,
  243. and so forth.
  244. .pp
  245. I can offer you a few hints
  246. for preparing text
  247. for input to \*G.
  248. First,
  249. keep the input lines short.
  250. Short input lines are easier to edit,
  251. and \*G will pack words onto longer lines
  252. for you anyhow.
  253. In keeping with this,
  254. it is helpful
  255. to begin a new line
  256. after every period,
  257. comma,
  258. or phrase,
  259. since common corrections
  260. are to add or delete sentences
  261. or phrases.
  262. Second,
  263. do not put spaces at the end of lines,
  264. since this can sometimes confuse the \*N
  265. processor.
  266. Third,
  267. do not hyphenate words at the end of lines
  268. (except words that should have hyphens in them,
  269. such as
  270. .q mother-in-law );
  271. \*G is smart enough to hyphenate words
  272. for you as needed,
  273. but is not smart enough
  274. to take hyphens out
  275. and join a word back together.
  276. Also,
  277. words such as
  278. .q mother-in-law
  279. should not be broken
  280. over a line,
  281. since then you will get a space
  282. where not wanted,
  283. such as
  284. .tr @-
  285. .nh
  286. .q "mother@\ in@law" .
  287. .br
  288. .tr @@
  289. .hy 14
  290. .sh 1 "Basic Requests"
  291. .sh 2 "Paragraphs"
  292. .pp
  293. Paragraphs are begun
  294. by using the
  295. .b .pp
  296. request.
  297. For example,
  298. the input:
  299. .(b
  300. \&.pp
  301. Now is the time for all good men
  302. to come to the aid of their party.
  303. Four score and seven years ago,...
  304. .)b
  305. produces a blank line
  306. followed by an indented first line.
  307. The result is:
  308. .(b F
  309. .ti +\n(piu
  310. Now is the time for all good men
  311. to come to the aid of their party.
  312. Four score and seven years ago,...
  313. .)b
  314. .pp
  315. Notice that the sentences
  316. of the paragraphs
  317. .i "must not"
  318. begin with a space,
  319. since blank lines
  320. and lines beginning with spaces
  321. cause a break.
  322. For example,
  323. if I had typed:
  324. .(b
  325. \&.pp
  326. Now is the time for all good men
  327.       to come to the aid of their party.
  328. Four score and seven years ago,...
  329. .)b
  330. The output would be:
  331. .(b F
  332. .ti +\n(piu
  333. Now is the time for all good men
  334.       to come to the aid of their party.
  335. Four score and seven years ago,...
  336. .)b
  337. A new line begins after the word
  338. .q men
  339. because the second line began with a space character.
  340. .pp
  341. There are many
  342. fancier
  343. types of paragraphs,
  344. which will be described later.
  345. .sh 2 "Headers and Footers"
  346. .pp
  347. Arbitrary headers and footers
  348. can be put
  349. at the top and bottom
  350. of every page.
  351. Two requests
  352. of the form
  353. .b .he \ \c
  354. .i title
  355. and
  356. .b .fo \ \c
  357. .i title
  358. define the titles to put at the head and the foot
  359. of every page,
  360. respectively.
  361. The titles are called
  362. .i three-part
  363. titles,
  364. that is,
  365. there is a left-justified part,
  366. a centered part,
  367. and a right-justified part.
  368. To separate these three parts
  369. the first character of
  370. .i title
  371. (whatever it may be)
  372. is used as a delimiter.
  373. Any character may be used,
  374. but
  375. backslash
  376. and double quote marks
  377. should be avoided.
  378. The percent sign
  379. is replaced by the current page number
  380. whenever found in the title.
  381. For example,
  382. the input:
  383. .(b
  384. \&.he \(aa\(aa%\(aa\(aa
  385. \&.fo \(aaJane Jones\(aa\(aaMy Book\(aa
  386. .)b
  387. results in the page number
  388. centered at the top
  389. of each page,
  390. .q "Jane Jones"
  391. in the lower left corner,
  392. and
  393. .q "My Book"
  394. in the lower right corner.
  395. .sh 2 "Double Spacing"
  396. .pp
  397. .ls 2
  398. \*G will double space output text automatically if you
  399. use the request
  400. .b ".ls\ 2" ,
  401. as is done in this section.
  402. You can revert to single spaced mode
  403. by typing
  404. .b ".ls\ 1" .
  405. .ls 1
  406. .sh 2 "Page Layout"
  407. .pp
  408. A number of requests allow
  409. you to change the way the printed copy looks,
  410. sometimes called the
  411. .i layout
  412. of the output page.
  413. Most of these requests adjust the placing
  414. of
  415. .q "white space"
  416. (blank lines or spaces).
  417. In these explanations,
  418. characters in italics
  419. should be replaced with values you wish to use;
  420. bold characters
  421. represent characters which should actually be typed.
  422. .pp
  423. The
  424. .b .bp
  425. request
  426. starts a new page.
  427. .pp
  428. The request
  429. .b .sp \ \c
  430. .i N
  431. leaves
  432. .i N
  433. lines of blank space.
  434. .i N
  435. can be omitted
  436. (meaning skip a single line)
  437. or can be of the form
  438. .i N \^\c
  439. .b i
  440. (for
  441. .i N
  442. inches)
  443. or
  444. .i N \^\c
  445. .b c
  446. (for
  447. .i N
  448. centimeters).
  449. For example, the input:
  450. .(b
  451. \&.sp 1.5i
  452. My thoughts on the subject
  453. \&.sp
  454. .)b
  455. leaves one and a half inches of space,
  456. followed by the line
  457. .q "My thoughts on the subject" ,
  458. followed by a single blank line.
  459. .pp
  460. The
  461. .b .in \ \c
  462. .i +N
  463. request
  464. changes the amount of white space
  465. on the left of the page
  466. (the
  467. .i indent ).
  468. The argument
  469. .i N
  470. can be of the form
  471. .b + \c
  472. .i N
  473. (meaning leave
  474. .i N
  475. spaces more than you are already leaving),
  476. .b \- \c
  477. .i N
  478. (meaning leave less than you do now),
  479. or just
  480. .i N
  481. (meaning leave exactly
  482. .i N
  483. spaces).
  484. .i N
  485. can be of the form
  486. .i N \^\c
  487. .b i
  488. or
  489. .i N \^\c
  490. .b c
  491. also.
  492. For example,
  493. the input:
  494. .(b
  495. initial text
  496. \&.in 5
  497. some text
  498. \&.in +1i
  499. more text
  500. \&.in \-2c
  501. final text
  502. .)b
  503. produces
  504. .q "some text"
  505. indented exactly five spaces
  506. from the left margin,
  507. .q "more text"
  508. indented five spaces
  509. plus one inch
  510. from the left margin
  511. (fifteen spaces
  512. on a pica typewriter),
  513. and
  514. .q "final text"
  515. indented five spaces
  516. plus one inch
  517. minus two centimeters
  518. from the margin.
  519. That is,
  520. the output is:
  521. .(b
  522. initial text
  523. .in +5
  524. some text
  525. .in +1i
  526. more text
  527. .in -2c
  528. final text
  529. .)b
  530. .pp
  531. The
  532. .b .ti \ \c
  533. .i +N
  534. (temporary indent)
  535. request is used like
  536. .b .in \ \c
  537. .i +N
  538. when the indent
  539. should apply to one line only,
  540. after which it should revert
  541. to the previous indent.
  542. For example,
  543. the input:
  544. .(b
  545. \&.in 1i
  546. \&.ti 0
  547. Ware, James R.  The Best of Confucius,
  548. Halcyon House, 1950.
  549. An excellent book containing translations of
  550. most of Confucius\(aa most delightful sayings.
  551. A definite must for anyone interested in the early foundations
  552. of Chinese philosophy.
  553. .)b
  554. produces:
  555. .in 1i+\n($iu
  556. .ti \n($iu
  557. Ware, James R.  The Best of Confucius,
  558. Halcyon House, 1950.
  559. An excellent book containing translations of
  560. most of Confucius' most delightful sayings.
  561. A definite must for anyone interested in the early foundations
  562. of Chinese philosophy.
  563. .pp
  564. Text lines can be centered
  565. by using the
  566. .b .ce
  567. request.
  568. The line after the
  569. .b .ce
  570. is centered
  571. (horizontally)
  572. on the page.
  573. To center more than one line,
  574. use
  575. .b .ce \ \c
  576. .i N
  577. (where
  578. .i N
  579. is the number of lines to center),
  580. followed by the
  581. .i N
  582. lines.
  583. If you want to center many lines
  584. but don't want to count them,
  585. type:
  586. .(b
  587. \&.ce 1000
  588. lines to center
  589. \&.ce 0
  590. .)b
  591. The
  592. .b ".ce\ 0"
  593. request tells \*G to center zero more lines,
  594. in other words,
  595. stop centering.
  596. .pp
  597. All of these requests
  598. cause a break;
  599. that is,
  600. they always start
  601. a new line.
  602. If you want to start a new line
  603. without performing any other action,
  604. use
  605. .b .br .
  606. .sh 1 "Displays"
  607. .pp
  608. Displays are sections of text
  609. to be set off
  610. from the body of the paper.
  611. Major quotes,
  612. tables,
  613. and figures
  614. are types of displays,
  615. as are all the examples
  616. used in this document.
  617. All displays
  618. except centered blocks
  619. are output
  620. single spaced.
  621. .sh 2 "Major Quotes"
  622. .pp
  623. Major quotes
  624. are quotes which are several lines long,
  625. and hence are set in from the rest
  626. of the text
  627. without quote marks
  628. around them.
  629. These can be generated
  630. using the commands
  631. .b .(q
  632. and
  633. .b .)q
  634. to surround the quote.
  635. For example,
  636. the input:
  637. .(b
  638. As Weizenbaum points out:
  639. \&.(q
  640. It is said that to explain is to explain away.
  641. This maxim is nowhere so well fulfilled
  642. as in the areas of computer programming,...
  643. \&.)q
  644. .)b
  645. generates as output:
  646. .lp
  647. As Weizenbaum points out:
  648. .(q
  649. It is said that to explain is to explain away.
  650. This maxim is nowhere so well fulfilled
  651. as in the areas of computer programming,...
  652. .)q
  653. .sh 2 "Lists"
  654. .pp
  655. A
  656. .i list
  657. is an indented,
  658. single spaced,
  659. unfilled display.
  660. Lists should be used
  661. when the material to be printed
  662. should not be filled and justified
  663. like normal text,
  664. such as columns of figures
  665. or the examples used in this paper.
  666. Lists are surrounded
  667. by the requests
  668. .b .(l
  669. and
  670. .b .)l .
  671. For example,
  672. type:
  673. .(b
  674. Alternatives to avoid deadlock are:
  675. \&.(l
  676. Lock in a specified order
  677. Detect deadlock and back out one process
  678. Lock all resources needed before proceeding
  679. \&.)l
  680. .)b
  681. will produce:
  682. .br
  683. Alternatives to avoid deadlock are:
  684. .(l
  685. Lock in a specified order
  686. Detect deadlock and back out one process
  687. Lock all resources needed before proceeding
  688. .)l
  689. .sh 2 "Keeps"
  690. .pp
  691. A
  692. .i keep
  693. is a display of lines
  694. which are kept on a single page
  695. if possible.
  696. An example of where you would use a keep
  697. might be a diagram.
  698. Keeps differ from lists
  699. in that lists may be broken
  700. over a page boundary
  701. whereas keeps will not.
  702. .pp
  703. Blocks are the basic kind of keep.
  704. They begin with the request
  705. .b .(b
  706. and end with the request
  707. .b .)b .
  708. If there is not room on the current page
  709. for everything in the block,
  710. a new page is begun.
  711. This has the unpleasant effect
  712. of leaving blank space
  713. at the bottom of the page.
  714. When this is not appropriate,
  715. you can use the alternative,
  716. called
  717. .i "floating keeps" .
  718. .pp
  719. .i "Floating keeps"
  720. move relative to the text.
  721. Hence,
  722. they are good for things
  723. which will be referred to
  724. by name,
  725. such as
  726. .q "See figure 3" .
  727. A floating keep will appear
  728. at the bottom of the current page
  729. if it will fit;
  730. otherwise,
  731. it will appear at the top
  732. of the next page.
  733. Floating keeps begin with the line
  734. .b .(z
  735. and end with the line
  736. .b .)z .
  737. For an example of a floating keep,
  738. see figure 1.
  739. .(z
  740. .in 1i
  741. .xl -1i
  742. .hl
  743. \&.(z
  744. \&.hl
  745. Text of keep to be floated.
  746. \&.sp
  747. \&.ce
  748. Figure 1.  Example of a Floating Keep.
  749. \&.hl
  750. \&.)z
  751. .sp
  752. .ce
  753. Figure 1.  Example of a Floating Keep.
  754. .hl
  755. .)z
  756. The
  757. .b .hl
  758. request is used
  759. to draw a horizontal line
  760. so that the figure
  761. stands out from the text.
  762. .sh 2 "Fancier Displays"
  763. .pp
  764. Keeps and lists are normally collected in
  765. .i nofill
  766. mode,
  767. so that they are good for tables and such.
  768. If you want a display
  769. in fill mode
  770. (for text),
  771. type
  772. .b ".(l\ F"
  773. (Throughout this section,
  774. comments applied to
  775. .b .(l
  776. also apply to
  777. .b .(b
  778. and
  779. .b .(z ).
  780. This kind of display
  781. will be indented from both margins.
  782. For example,
  783. the input:
  784. .(b
  785. \&.(l F
  786. And now boys and girls,
  787. a newer, bigger, better toy than ever before!
  788. Be the first on your block to have your own computer!
  789. Yes kids, you too can have one of these modern
  790. data processing devices.
  791. You too can produce beautifully formatted papers
  792. without even batting an eye!
  793. \&.)l
  794. .)b
  795. will be output as:
  796. .(b F
  797. And now boys and girls,
  798. a newer, bigger, better toy than ever before!
  799. Be the first on your block to have your own computer!
  800. Yes kids, you too can have one of these modern
  801. data processing devices.
  802. You too can produce beautifully formatted papers
  803. without even batting an eye!
  804. .)b
  805. .pp
  806. Lists and blocks are also normally indented
  807. (floating keeps are normally left justified).
  808. To get a left-justified list,
  809. type
  810. .b ".(l\ L" .
  811. To get a list centered
  812. line-for-line,
  813. type
  814. .b ".(l C" .
  815. For example,
  816. to get a filled,
  817. left justified list, enter:
  818. .(b
  819. \&.(l L F
  820. text of block
  821. \&.)l
  822. .)b
  823. The input:
  824. .(b
  825. \&.(l
  826. first line of unfilled display
  827. more lines
  828. \&.)l
  829. .)b
  830. produces the indented text:
  831. .(b
  832. first line of unfilled display
  833. more lines
  834. .)b
  835. Typing the character
  836. .b L
  837. after the
  838. .b .(l
  839. request produces the left justified result:
  840. .(b L
  841. first line of unfilled display
  842. more lines
  843. .)b
  844. Using
  845. .b C
  846. instead of
  847. .b L
  848. produces the line-at-a-time centered output:
  849. .(b C
  850. first line of unfilled display
  851. more lines
  852. .)b
  853. .pp
  854. Sometimes it may be
  855. that you want to center several lines
  856. as a group,
  857. rather than centering them
  858. one line at a time.
  859. To do this
  860. use centered blocks,
  861. which are surrounded by the requests
  862. .b .(c
  863. and
  864. .b .)c .
  865. All the lines are centered as a unit,
  866. such that the longest line is centered
  867. and the rest are
  868. lined up around that line.
  869. Notice that lines
  870. do not move
  871. relative to each other
  872. using centered blocks,
  873. whereas they do
  874. using the
  875. .b C
  876. argument to keeps.
  877. .pp
  878. Centered blocks are
  879. .i not
  880. keeps,
  881. and may be used
  882. in conjunction
  883. with keeps.
  884. For example,
  885. to center a group of lines
  886. as a unit
  887. and keep them
  888. on one page,
  889. use:
  890. .(b
  891. \&.(b L
  892. \&.(c
  893. first line of unfilled display
  894. more lines
  895. \&.)c
  896. \&.)b
  897. .)b
  898. to produce:
  899. .(b L
  900. .(c
  901. first line of unfilled display
  902. more lines
  903. .)c
  904. .)b
  905. If the block requests
  906. (\c
  907. .b .(b
  908. and
  909. .b .)b )
  910. had been omitted
  911. the result would have been the same,
  912. but with no guarantee
  913. that the lines of the centered block
  914. would have all been on one page.
  915. Note the use of the
  916. .b L
  917. argument to
  918. .b .(b ;
  919. this causes the centered block
  920. to center within the entire line
  921. rather than within the line
  922. minus the indent.
  923. Also,
  924. the center requests
  925. must
  926. be nested
  927. .i inside
  928. the keep requests.
  929. .sh 1 "Annotations"
  930. .pp
  931. There are a number of requests
  932. to save text
  933. for later printing.
  934. .i Footnotes
  935. are printed at the bottom of the current page.
  936. .i "Delayed text"
  937. is intended to be a variant form
  938. of footnote;
  939. the text is printed only 
  940. when explicitly called for,
  941. such as at the end of each chapter.
  942. .i Indexes
  943. are a type of delayed text
  944. having a tag
  945. (usually the page number)
  946. attached to each entry
  947. after a row of dots.
  948. Indexes are also saved
  949. until called for explicitly.
  950. .sh 2 "Footnotes"
  951. .pp
  952. Footnotes begin with the request
  953. .b .(f
  954. and end with the request
  955. .b .)f .
  956. The current footnote number is maintained
  957. automatically,
  958. and can be used by typing \e**,
  959. to produce a footnote number\**.
  960. .(f
  961. \**Like this.
  962. .)f
  963. The number is automatically incremented
  964. after every footnote.
  965. For example,
  966. the input:
  967. .(b
  968. \&.(q
  969. A man who is not upright
  970. and at the same time is presumptuous;
  971. one who is not diligent and at the same time is ignorant;
  972. one who is untruthful and at the same time is incompetent;
  973. such men I do not count among acquaintances.\e**
  974. \&.(f
  975. \e**James R. Ware,
  976. \&.ul
  977. The Best of Confucius,
  978. Halcyon House, 1950.
  979. Page 77.
  980. \&.)f
  981. \&.)q
  982. .)b
  983. generates the result:
  984. .(q
  985. A man who is not upright
  986. and at the same time is presumptuous;
  987. one who is not diligent and at the same time is ignorant;
  988. one who is untruthful and at the same time is incompetent;
  989. such men I do not count among acquaintances.\**
  990. .(f
  991. \**James R. Ware,
  992. .ul
  993. The Best of Confucius,
  994. Halcyon House, 1950.
  995. Page 77.
  996. .)f
  997. .)q
  998. It is important
  999. that the footnote
  1000. appears
  1001. .i inside
  1002. the quote,
  1003. so that you can be sure
  1004. that the footnote
  1005. will appear
  1006. on the same page
  1007. as the quote.
  1008. .sh 2 "Delayed Text"
  1009. .pp
  1010. Delayed text
  1011. is very similar to a footnote
  1012. except that it is printed
  1013. when called for explicitly.
  1014. This allows a list of
  1015. references to
  1016. appear
  1017. (for example)
  1018. at the end of each chapter,
  1019. as is the convention in some disciplines.
  1020. Use
  1021. .b \e*#
  1022. on delayed text
  1023. instead of
  1024. .b \e**
  1025. as on footnotes.
  1026. .pp
  1027. If you are using delayed text
  1028. as your standard reference mechanism,
  1029. you can still use footnotes,
  1030. except that you may want to reference them
  1031. with special characters*
  1032. .(f
  1033. *Such as an asterisk.
  1034. .)f
  1035. rather than numbers.
  1036. .sh 2 "Indexes"
  1037. .pp
  1038. An
  1039. .q index
  1040. (actually more like a table of contents,
  1041. since the entries are not sorted alphabetically)
  1042. resembles delayed text,
  1043. in that it is saved until called for.
  1044. However,
  1045. each entry has the page number
  1046. (or some other tag)
  1047. appended to the last line
  1048. of the index entry
  1049. after a row of dots.
  1050. .pp
  1051. Index entries begin with the request
  1052. .b .(x
  1053. and end with
  1054. .b .)x .
  1055. The
  1056. .b .)x
  1057. request may have a argument,
  1058. which is the value to print
  1059. as the
  1060. .q "page number" .
  1061. It defaults to the current page number.
  1062. If the page number given is an underscore
  1063. (\c
  1064. .q _ )
  1065. no page number
  1066. or line of dots
  1067. is printed at all.
  1068. To get the line of dots
  1069. without a page number,
  1070. type
  1071. .b ".)x """"" ,
  1072. which specifies an explicitly null page number.
  1073. .pp
  1074. The
  1075. .b .xp
  1076. request prints the index.
  1077. .pp
  1078. For example,
  1079. the input:
  1080. .(b
  1081. \&.(x
  1082. Sealing wax
  1083. \&.)x
  1084. \&.(x
  1085. Cabbages and kings
  1086. \&.)x _
  1087. \&.(x
  1088. Why the sea is boiling hot
  1089. \&.)x 2.5a
  1090. \&.(x
  1091. Whether pigs have wings
  1092. \&.)x ""
  1093. \&.(x
  1094. This is a terribly long index entry, such as might be used
  1095. for a list of illustrations, tables, or figures; I expect it to
  1096. take at least two lines.
  1097. \&.)x
  1098. \&.xp
  1099. .)b
  1100. generates:
  1101. .(x
  1102. Sealing wax
  1103. .)x
  1104. .(x
  1105. Cabbages and kings
  1106. .)x _
  1107. .(x
  1108. Why the sea is boiling hot
  1109. .)x 2.5a
  1110. .(x
  1111. Whether pigs have wings
  1112. .)x ""
  1113. .(x
  1114. This is a terribly long index entry, such as might be used
  1115. for a list of illustrations, tables, or figures; I expect it to
  1116. take at least two lines.
  1117. .)x
  1118. .xp
  1119. .pp
  1120. The
  1121. .b .(x
  1122. request may have a single character
  1123. argument,
  1124. specifying the
  1125. .q name
  1126. of the index;
  1127. the normal index is
  1128. .b x .
  1129. Thus,
  1130. several
  1131. .q indices
  1132. may be maintained simultaneously
  1133. (such as a list of tables, table of contents, etc.).
  1134. .pp
  1135. Notice that the index must be printed
  1136. at the
  1137. .i end
  1138. of the paper,
  1139. rather than at the beginning
  1140. where it will probably appear
  1141. (as a table of contents);
  1142. the pages may have to be physically rearranged
  1143. after printing.
  1144. .sh 1 "Fancier Features"
  1145. .pp
  1146. A large number of fancier requests
  1147. exist,
  1148. notably requests to provide other sorts of paragraphs,
  1149. numbered sections of the form
  1150. .b 1.2.3
  1151. (such as used in this document),
  1152. and multicolumn output.
  1153. .sh 2 "More Paragraphs"
  1154. .pp
  1155. Paragraphs generally start with
  1156. a blank line
  1157. and with the first line
  1158. indented.
  1159. It is possible to get
  1160. left-justified block-style paragraphs
  1161. by using
  1162. .b .lp
  1163. instead of
  1164. .b .pp ,
  1165. as demonstrated by the next paragraph.
  1166. .lp
  1167. Sometimes you want to use paragraphs
  1168. that have the
  1169. .i body
  1170. indented,
  1171. and the first line
  1172. exdented
  1173. (opposite of indented)
  1174. with a label.
  1175. This can be done with the
  1176. .b .ip
  1177. request.
  1178. A word specified on the same line as
  1179. .b .ip
  1180. is printed in the margin,
  1181. and the body is lined up
  1182. at a prespecified position
  1183. (normally five spaces).
  1184. For example,
  1185. the input:
  1186. .(b
  1187. \&.ip one
  1188. This is the first paragraph.
  1189. Notice how the first line
  1190. of the resulting paragraph lines up
  1191. with the other lines in the paragraph.
  1192. \&.ip two
  1193. And here we are at the second paragraph already.
  1194. You may notice that the argument to \c
  1195. .b .ip
  1196. appears
  1197. in the margin.
  1198. \&.lp
  1199. We can continue text...
  1200. .)b
  1201. produces as output:
  1202. .ip one
  1203. This is the first paragraph.
  1204. Notice how the first line of the resulting paragraph lines up
  1205. with the other lines in the paragraph.
  1206. .ip two
  1207. And here we are at the second paragraph already.
  1208. You may notice that the argument to
  1209. .b .ip
  1210. appears
  1211. in the margin.
  1212. .lp
  1213. We can continue text without starting a new indented
  1214. paragraph
  1215. by using the
  1216. .b .lp
  1217. request.
  1218. .pp
  1219. If you have spaces in the label of a
  1220. .b .ip
  1221. request,
  1222. you must use an
  1223. .q "unpaddable space"
  1224. instead of a regular space.
  1225. This is typed as a backslash character
  1226. (\c
  1227. .q \e )
  1228. followed by a space.
  1229. For example,
  1230. to print the label
  1231. .q "Part 1" ,
  1232. enter:
  1233. .(b
  1234. \&.ip "Part\e 1"
  1235. .)b
  1236. .pp
  1237. If a label of an indented paragraph
  1238. (that is, the argument to
  1239. .b .ip )
  1240. is longer than the space allocated for the label,
  1241. .b .ip
  1242. will begin a new line after the label.
  1243. For example,
  1244. the input:
  1245. .(b
  1246. \&.ip longlabel
  1247. This paragraph had a long label.
  1248. The first character of text on the first line
  1249. will not line up with the text on second and subsequent lines,
  1250. although they will line up with each other.
  1251. .)b
  1252. will produce:
  1253. .ip longlabel
  1254. This paragraph had a long label.
  1255. The first character of text on the first line
  1256. will not line up with the text on second and subsequent lines,
  1257. although they will line up with each other.
  1258. .pp
  1259. It is possible to change the size of the label
  1260. by using a second argument
  1261. which is the size of the label.
  1262. For example,
  1263. the above example could be done correctly
  1264. by saying:
  1265. .(b
  1266. \&.ip longlabel 10
  1267. .)b
  1268. which will make the paragraph indent
  1269. 10 spaces for this paragraph only.
  1270. If you have many paragraphs to indent
  1271. all the same amount,
  1272. use the
  1273. .i "number register"
  1274. .b ii .
  1275. For example, to leave one inch of space
  1276. for the label,
  1277. type:
  1278. .(b
  1279. \&.nr ii 1i
  1280. .)b
  1281. somewhere before the first call to
  1282. .b .ip .
  1283. Refer to the reference manual
  1284. for more information.
  1285. .pp
  1286. If
  1287. .b .ip
  1288. is used
  1289. with no argument at all
  1290. no hanging tag will be printed.
  1291. For example,
  1292. the input:
  1293. .(b
  1294. \&.ip [a]
  1295. This is the first paragraph of the example.
  1296. We have seen this sort of example before.
  1297. \&.ip
  1298. This paragraph is lined up with the previous paragraph,
  1299. but it has no tag in the margin.
  1300. .)b
  1301. produces as output:
  1302. .ip [a]
  1303. This is the first paragraph of the example.
  1304. We have seen this sort of example before.
  1305. .ip
  1306. This paragraph is lined up with the previous paragraph,
  1307. but it has no tag in the margin.
  1308. .pp
  1309. A special case of
  1310. .b .ip
  1311. is
  1312. .b .np ,
  1313. which automatically
  1314. numbers paragraphs sequentially from 1.
  1315. The numbering is reset at the next
  1316. .b .pp ,
  1317. .b .lp ,
  1318. or
  1319. .b .sh
  1320. (to be described in the next section)
  1321. request.
  1322. For example,
  1323. the input:
  1324. .(b
  1325. \&.np
  1326. This is the first point.
  1327. \&.np
  1328. This is the second point.
  1329. Points are just regular paragraphs
  1330. which are given sequence numbers automatically
  1331. by the .np request.
  1332. \&.pp
  1333. This paragraph will reset numbering by .np.
  1334. \&.np
  1335. For example,
  1336. we have reverted to numbering from one now.
  1337. .)b
  1338. generates:
  1339. .np
  1340. This is the first point.
  1341. .np
  1342. This is the second point.
  1343. Points are just regular paragraphs
  1344. which are given sequence numbers automatically
  1345. by the .np request.
  1346. .pp
  1347. This paragraph will reset numbering by .np.
  1348. .np
  1349. For example,
  1350. we have reverted to numbering from one now.
  1351. .pp
  1352. The
  1353. .b .bu
  1354. request gives lists of this sort that are identified with
  1355. bullets rather than numbers.
  1356. The paragraphs are also crunched together.
  1357. For example,
  1358. the input:
  1359. .(b
  1360. \&.bu
  1361. \&One egg yolk
  1362. \&.bu
  1363. \&One tablespoon cream or top milk
  1364. \&.bu
  1365. \&Salt, cayenne, and lemon juice to taste
  1366. \&.bu
  1367. \&A generous two tablespoonfuls of butter
  1368. .)b
  1369. produces\**:
  1370. .(f
  1371. \**By the way,
  1372. if you put the first three ingredients in a a heavy, deep pan
  1373. and whisk the ingredients madly over a medium flame
  1374. (never taking your hand off the handle of the pot)
  1375. until the mixture reaches the consistency of custard
  1376. (just a minute or two),
  1377. then mix in the butter off-heat,
  1378. you will have a wonderful Hollandaise sauce.
  1379. .)f
  1380. .bu
  1381. One egg yolk
  1382. .bu
  1383. One tablespoon cream or top milk
  1384. .bu
  1385. Salt, cayenne, and lemon juice to taste
  1386. .bu
  1387. A generous two tablespoonfuls of butter
  1388. .sh 2 "Section Headings"
  1389. .pp
  1390. Section numbers
  1391. (such as the ones used in this document)
  1392. can be automatically generated
  1393. using the
  1394. .b .sh
  1395. request.
  1396. You must tell
  1397. .b .sh
  1398. the
  1399. .i depth
  1400. of the section number
  1401. and a section title.
  1402. The depth
  1403. specifies how many numbers
  1404. are to appear
  1405. (separated by decimal points)
  1406. in the section number.
  1407. For example,
  1408. the section number
  1409. .b 4.2.5
  1410. has a depth of three.
  1411. .pp
  1412. Section numbers
  1413. are incremented
  1414. in a fairly intuitive fashion.
  1415. If you add a number
  1416. (increase the depth),
  1417. the new number starts out
  1418. at one.
  1419. If you subtract section numbers
  1420. (or keep the same number)
  1421. the final number is incremented.
  1422. For example,
  1423. the input:
  1424. .(b
  1425. \&.sh 1 "The Preprocessor"
  1426. \&.sh 2 "Basic Concepts"
  1427. \&.sh 2 "Control Inputs"
  1428. \&.sh 3
  1429. \&.sh 3
  1430. \&.sh 1 "Code Generation"
  1431. \&.sh 3
  1432. .)b
  1433. produces as output the result:
  1434. .(b
  1435. .b
  1436. 1.  The Preprocessor
  1437. 1.1.  Basic Concepts
  1438. 1.2.  Control Inputs
  1439. 1.2.1.
  1440. 1.2.2.
  1441. 2.  Code Generation
  1442. 2.1.1.
  1443. .)b
  1444. .pp
  1445. You can specify the section number to begin
  1446. by placing the section number after the section title,
  1447. using spaces instead of dots.
  1448. For example,
  1449. the request:
  1450. .(b
  1451. \&.sh 3 "Another section" 7 3 4
  1452. .)b
  1453. will begin the section numbered
  1454. .b 7.3.4 ;
  1455. all subsequent
  1456. .b .sh
  1457. requests will number relative to this number.
  1458. .pp
  1459. There are more complex features
  1460. which will cause each section to be indented
  1461. proportionally to the depth of the section.
  1462. For example, if you enter:
  1463. .(b
  1464. \&.nr si \c
  1465. .i N
  1466. .)b
  1467. each section will be indented by an amount
  1468. .i N .
  1469. .i N
  1470. must have a scaling factor attached,
  1471. that is, it must be of the form
  1472. .i Nx ,
  1473. where
  1474. .i x
  1475. is a character telling what units
  1476. .i N
  1477. is in.
  1478. Common values for
  1479. .i x
  1480. are
  1481. .b i
  1482. for inches,
  1483. .b c
  1484. for centimeters,
  1485. and
  1486. .b n
  1487. for
  1488. .i ens
  1489. (the width of a single character).
  1490. For example,
  1491. to indent each section
  1492. one-half inch,
  1493. type:
  1494. .(b
  1495. \&.nr si 0.5i
  1496. .)b
  1497. After this,
  1498. sections will be indented by
  1499. one-half inch
  1500. per level of depth in the section number.
  1501. For example,
  1502. this document was produced
  1503. using the request
  1504. .(b
  1505. \&.nr si 3n
  1506. .)b
  1507. at the beginning of the input file,
  1508. giving three spaces of indent
  1509. per section depth.
  1510. .pp
  1511. Section headers without automatically generated numbers
  1512. can be done using:
  1513. .(b
  1514. \&.uh "Title"
  1515. .)b
  1516. which will do a section heading,
  1517. but will put no number on the section.
  1518. .sh 2 "Parts of the Basic Paper"
  1519. .pp
  1520. There are some requests
  1521. which assist in setting up
  1522. papers.
  1523. The
  1524. .b .tp
  1525. request
  1526. initializes for a title page.
  1527. There are no headers or footers
  1528. on a title page,
  1529. and unlike other pages
  1530. you can space down
  1531. and leave blank space
  1532. at the top.
  1533. For example,
  1534. a typical title page might appear as:
  1535. .(b
  1536. \&.tp
  1537. \&.sp 2i
  1538. \&.(l C
  1539. THE GROWTH OF TOENAILS
  1540. IN UPPER PRIMATES
  1541. \&.sp
  1542. by
  1543. \&.sp
  1544. Frank N. Furter
  1545. \&.)l
  1546. \&.bp
  1547. .)b
  1548. .pp
  1549. The
  1550. .b .+c \ \c
  1551. .i T
  1552. request can be used
  1553. to start chapters.
  1554. Each chapter is automatically numbered
  1555. from one,
  1556. and a heading is printed at the top of each chapter
  1557. with the chapter number
  1558. and the chapter name
  1559. .i T .
  1560. For example,
  1561. to begin a chapter called
  1562. .q Conclusions ,
  1563. use the request:
  1564. .(b
  1565. \&.+c "CONCLUSIONS"
  1566. .)b
  1567. which will produce,
  1568. on a new page,
  1569. the lines
  1570. .(b C
  1571. CHAPTER 5
  1572. CONCLUSIONS
  1573. .)b
  1574. with appropriate spacing for a thesis.
  1575. Also, the header is moved to the foot of the page
  1576. on the first page of a chapter.
  1577. Although the
  1578. .b .+c
  1579. request was not designed to work only with the
  1580. .b .th
  1581. request,
  1582. it is tuned for the format acceptable
  1583. for a PhD thesis
  1584. at Berkeley.
  1585. .pp
  1586. If the
  1587. title parameter
  1588. .i T
  1589. is omitted from the
  1590. .b .+c
  1591. request,
  1592. the result is a chapter with no heading.
  1593. This can also be used at the beginning
  1594. of a paper;
  1595. for example,
  1596. .b .+c
  1597. was used to generate page one
  1598. of this document.
  1599. .pp
  1600. Although
  1601. papers traditionally have the abstract,
  1602. table of contents,
  1603. and so forth at the front of the paper,
  1604. it is more convenient to format
  1605. and print them last
  1606. when using \*G.
  1607. This is so that index entries
  1608. can be collected and then printed
  1609. for the table of contents
  1610. (or whatever).
  1611. At the end of the paper,
  1612. issue the
  1613. .b ".++ P"
  1614. request,
  1615. which begins the preliminary part
  1616. of the paper.
  1617. After issuing this request,
  1618. the
  1619. .b .+c
  1620. request will begin a preliminary section
  1621. of the paper.
  1622. Most notably,
  1623. this prints the page number
  1624. restarted from one
  1625. in lower case Roman numbers.
  1626. .b .+c
  1627. may be used repeatedly
  1628. to begin different parts of the
  1629. front material
  1630. for example,
  1631. the abstract,
  1632. the table of contents,
  1633. acknowledgments,
  1634. list of illustrations,
  1635. etc.
  1636. The request
  1637. .b ".++ B"
  1638. may also be used
  1639. to begin the bibliographic section
  1640. at the end of the paper.
  1641. For example,
  1642. the paper might appear
  1643. as outlined in figure 2.
  1644. (In this figure,
  1645. comments begin with the sequence
  1646. .b \e" .)
  1647. .(z
  1648. .hl
  1649. .if t .in 0.5i
  1650. .if t .ta 2i
  1651. .if n .ta 3i
  1652. \&.th    \e" set for thesis mode
  1653. \&.fo \(aa\(aaDRAFT\(aa\(aa    \e" define footer for each page
  1654. \&.tp    \e" begin title page
  1655. \&.(l C    \e" center a large block
  1656. THE GROWTH OF TOENAILS
  1657. IN UPPER PRIMATES
  1658. \&.sp
  1659. by
  1660. \&.sp
  1661. Frank Furter
  1662. \&.)l    \e" end centered part
  1663. \&.+c INTRODUCTION    \e" begin chapter named "INTRODUCTION"
  1664. \&.(x t    \e" make an entry into index `t'
  1665. Introduction
  1666. \&.)x    \e" end of index entry
  1667. text of chapter one
  1668. \&.+c "NEXT CHAPTER"    \e" begin another chapter
  1669. \&.(x t    \e" enter into index `t' again
  1670. Next Chapter
  1671. \&.)x
  1672. text of chapter two
  1673. \&.+c CONCLUSIONS
  1674. \&.(x t
  1675. Conclusions
  1676. \&.)x
  1677. text of chapter three
  1678. \&.++ B    \e" begin bibliographic information
  1679. \&.+c BIBLIOGRAPHY    \e" begin another `chapter'
  1680. \&.(x t
  1681. Bibliography
  1682. \&.)x
  1683. text of bibliography
  1684. \&.++ P    \e" begin preliminary material
  1685. \&.+c "TABLE OF CONTENTS"
  1686. \&.xp t    \e" print index `t' collected above
  1687. \&.+c PREFACE    \e" begin another preliminary section
  1688. text of preface
  1689. .sp 2
  1690. .in 0
  1691. .ce
  1692. Figure 2.  Outline of a Sample Paper
  1693. .hl
  1694. .)z
  1695. .sh 2 "Equations and Tables"
  1696. .pp
  1697. Two special \*U programs exist
  1698. to format special types of material.
  1699. .b Eqn
  1700. sets equations.
  1701. .b Tbl
  1702. arranges to print
  1703. extremely pretty tables
  1704. in a variety of formats.
  1705. This document will only describe
  1706. the embellishments
  1707. to the standard features;
  1708. consult the reference manuals
  1709. for those processors
  1710. for a description of their use.
  1711. .pp
  1712. The
  1713. .b eqn
  1714. program is described fully
  1715. in the document
  1716. .ul
  1717. Typesetting Mathematics \- User's Guide
  1718. by Brian W. Kernighan
  1719. and Lorinda L. Cherry.
  1720. Equations are centered,
  1721. and are kept on one page.
  1722. They are introduced by the
  1723. .b .EQ
  1724. request and terminated by the
  1725. .b .EN
  1726. request.
  1727. .pp
  1728. The
  1729. .b .EQ
  1730. request may take an
  1731. equation number as an
  1732. optional argument,
  1733. which is printed vertically centered
  1734. on the right hand side
  1735. of the equation.
  1736. If the equation becomes too long
  1737. it should be split
  1738. between two lines.
  1739. To do this, type:
  1740. .(b
  1741. \&.EQ (eq 34)
  1742. text of equation 34
  1743. \&.EN C
  1744. \&.EQ
  1745. continuation of equation 34
  1746. \&.EN
  1747. .)b
  1748. The
  1749. .b C
  1750. on the
  1751. .b .EN
  1752. request
  1753. specifies that the equation
  1754. will be continued.
  1755. .pp
  1756. The
  1757. .b tbl
  1758. program produces tables.
  1759. It is fully described
  1760. (including numerous examples)
  1761. in the document
  1762. .ul
  1763. Tbl \- A Program to Format Tables
  1764. by M. E. Lesk.
  1765. Tables begin with the
  1766. .b .TS
  1767. request
  1768. and end with the
  1769. .b .TE
  1770. request.
  1771. Tables are normally kept on a single page.
  1772. If you have a table which is too big
  1773. to fit on a single page,
  1774. so that you know it will extend
  1775. to several pages,
  1776. begin the table with the request
  1777. .b ".TS\ H"
  1778. and put the request
  1779. .b .TH
  1780. after the part of the table
  1781. which you want
  1782. duplicated at the top of every page
  1783. that the table is printed on.
  1784. For example, a table definition
  1785. for a long table might look like:
  1786. .ds TA \|\h'.4n'\v'-.2n'\s-4\zT\s0\v'.2n'\h'-.4n'\(ci\|
  1787. .if n .ds TA \ \o'-T'\ \"
  1788. .(b
  1789. \&.TS H
  1790. c s s
  1791. n n n.
  1792. THE TABLE TITLE
  1793. \&.TH
  1794. text of the table
  1795. \&.TE
  1796. .)b
  1797. .pp
  1798. .sh 2 "Two Column Output"
  1799. .pp
  1800. You can get two column output
  1801. automatically
  1802. by using the request
  1803. .b .2c .
  1804. This causes everything after it
  1805. to be output in two-column form.
  1806. The request
  1807. .b .bc
  1808. will start a new column;
  1809. it differs from
  1810. .b .bp
  1811. in that
  1812. .b .bp
  1813. may leave a totally blank column
  1814. when it starts a new page.
  1815. To revert to single column output,
  1816. use
  1817. .b .1c .
  1818. .sh 2 "Defining Macros"
  1819. .pp
  1820. A
  1821. .i macro
  1822. is a collection of requests and text
  1823. which may be used
  1824. by stating a simple request.
  1825. Macros begin with the line
  1826. .b ".de" \ \c
  1827. .i xx
  1828. (where
  1829. .i xx
  1830. is the name of the macro to be defined)
  1831. and end with the line consisting of two dots.
  1832. After defining the macro,
  1833. stating the line
  1834. .b . \c
  1835. .i xx
  1836. is the same as stating all the other lines.
  1837. For example,
  1838. to define a macro
  1839. that spaces 3 lines
  1840. and then centers the next input line,
  1841. enter:
  1842. .(b
  1843. \&.de SS
  1844. \&.sp 3
  1845. \&.ce
  1846. \&..
  1847. .)b
  1848. and use it by typing:
  1849. .(b
  1850. \&.SS
  1851. \&Title Line
  1852. (beginning of text)
  1853. .)b
  1854. .pp
  1855. Macro names may be one or two characters.
  1856. In order to avoid conflicts
  1857. with names in \-me,
  1858. always use upper case letters as names.
  1859. The only names to avoid are
  1860. .b TS ,
  1861. .b TH ,
  1862. .b TE ,
  1863. .b EQ ,
  1864. and
  1865. .b EN .
  1866. .sh 2 "Annotations Inside Keeps"
  1867. .pp
  1868. Sometimes you may want to put
  1869. a footnote
  1870. or index entry inside a keep.
  1871. For example,
  1872. if you want to maintain a
  1873. .q "list of figures"
  1874. you will want to do something like:
  1875. .(b
  1876. \&.(z
  1877. \&.(c
  1878. text of figure
  1879. \&.)c
  1880. \&.ce
  1881. Figure 5.
  1882. \&.(x f
  1883. Figure 5
  1884. \&.)x
  1885. \&.)z
  1886. .)b
  1887. which you may hope
  1888. will give you a figure
  1889. with a label
  1890. and an entry in the index
  1891. .b f
  1892. (presumably a list of figures index).
  1893. Unfortunately,
  1894. the
  1895. index entry
  1896. is read and interpreted
  1897. when the keep is read,
  1898. not when it is printed,
  1899. so the page number in the index is likely to be wrong.
  1900. The solution is to use the magic string
  1901. .b \e!
  1902. at the beginning of all the lines dealing with the index.
  1903. In other words,
  1904. you should use:
  1905. .(b
  1906. \&.(z
  1907. \&.(c
  1908. Text of figure
  1909. \&.)c
  1910. \&.ce
  1911. Figure 5.
  1912. \e!.(x f
  1913. \e!Figure 5
  1914. \e!.)x
  1915. \&.)z
  1916. .)b
  1917. which will defer the processing of the index
  1918. until the figure is output.
  1919. This will guarantee
  1920. that the page number in the index
  1921. is correct.
  1922. The same comments apply
  1923. to
  1924. blocks
  1925. (with
  1926. .b .(b
  1927. and
  1928. .b .)b )
  1929. as well.
  1930. .sh 1 "\*T and the Photosetter"
  1931. .pp
  1932. With a little care,
  1933. you can prepare
  1934. documents that
  1935. will print nicely
  1936. on either a regular terminal
  1937. or when phototypeset
  1938. using the \*T formatting program.
  1939. .sh 2 "Fonts"
  1940. .pp
  1941. A
  1942. .i font
  1943. is a style of type.
  1944. There are three fonts
  1945. that are available simultaneously,
  1946. Times Roman,
  1947. Times Italic,
  1948. and Times Bold,
  1949. plus the special math font.
  1950. The normal font is Roman.
  1951. .pp
  1952. There are ways of switching between fonts.
  1953. The requests
  1954. .b .r ,
  1955. .b .i ,
  1956. .b .b ,
  1957. and
  1958. .b .bi
  1959. switch to Roman,
  1960. italic,
  1961. bold,
  1962. and bold-italic fonts respectively.
  1963. You can set a single word
  1964. in some font
  1965. by typing (for example):
  1966. .(b
  1967. \&.i word
  1968. .)b
  1969. which will set
  1970. .i word
  1971. in italics
  1972. but does not affect the surrounding text.
  1973. .pp
  1974. Notice that if you are setting more than one word
  1975. in whatever font,
  1976. you must surround that word with double quote marks
  1977. (`\|"\|')
  1978. so that it will appear to the \*G processor as a single word.
  1979. The quote marks will not appear in the formatted text.
  1980. If you do want a quote mark to appear,
  1981. you should quote the entire string
  1982. (even if a single word),
  1983. and use
  1984. .i two
  1985. quote marks where you want one to appear.
  1986. For example,
  1987. if you want to produce the text:
  1988. .(b
  1989. .i """Master Control\|"""
  1990. .)b
  1991. in italics, you must type:
  1992. .(b
  1993. \&.i """Master Control\e|"""
  1994. .)b
  1995. The
  1996. .b \e|
  1997. produces a very narrow space
  1998. so that the
  1999. .q l
  2000. does not overlap the quote sign in \*G,
  2001. like this:
  2002. .(b
  2003. .i """Master Control"""
  2004. .)b
  2005. .pp
  2006. There are also some
  2007. .q pseudo-fonts
  2008. available.
  2009. The input:
  2010. .(b
  2011. \&.(b
  2012. \&.u underlined
  2013. \&.bx "words in a box"
  2014. \&.)b
  2015. .)b
  2016. generates
  2017. .(b
  2018. .u underlined
  2019. .bx "words in a box"
  2020. .)b
  2021. Notice that pseudo font requests
  2022. set only the single parameter in the pseudo font;
  2023. ordinary font requests will begin setting all text
  2024. in the special font
  2025. if you do not provide a parameter.
  2026. No more than one word
  2027. should appear
  2028. with these three font requests
  2029. in the middle of lines.
  2030. This is because
  2031. of the way \*G justifies text.
  2032. For example,
  2033. if you were to issue the requests:
  2034. .(b
  2035. \&.u "some bold italics"
  2036. and
  2037. \&.bx "words in a box"
  2038. .)b
  2039. in the middle of a line
  2040. \*G would produce
  2041. .u "some bold italics"
  2042. and
  2043. .bx "words in a box" ,\p
  2044. which I think you will agree does not look good.
  2045. .pp
  2046. The second parameter
  2047. of all font requests
  2048. is set in the original font.
  2049. For example,
  2050. the font request:
  2051. .(b
  2052. \&.b bold face
  2053. .)b
  2054. generates
  2055. .q bold
  2056. in bold font,
  2057. but sets
  2058. .q face
  2059. in the font of the surrounding text,
  2060. resulting in:
  2061. .(b
  2062. .b bold face.
  2063. .)b
  2064. To set the two words
  2065. .b bold
  2066. and
  2067. .b face
  2068. both in
  2069. .b "bold face" ,
  2070. type:
  2071. .(b
  2072. \&.b "bold face"
  2073. .)b
  2074. .pp
  2075. You can mix fonts in a word by using the
  2076. special sequence
  2077. .b \ec
  2078. at the end of a line
  2079. to indicate
  2080. .q "continue text processing" ;
  2081. this allows input lines
  2082. to be joined together
  2083. without a space between them.
  2084. For example, the input:
  2085. .(b
  2086. \&.u under \ec
  2087. \&.i italics
  2088. .)b
  2089. generates
  2090. .u under \c
  2091. .i italics ,
  2092. but if we had typed:
  2093. .(b
  2094. \&.u under
  2095. \&.i italics
  2096. .)b
  2097. the result would have been
  2098. .u under
  2099. .i italics
  2100. as two words.
  2101. .sh 2 "Point Sizes"
  2102. .pp
  2103. The phototypesetter
  2104. supports different sizes of type,
  2105. measured in points.
  2106. The default point size
  2107. is 10 points
  2108. for most text,
  2109. 8 points for footnotes.
  2110. To change the pointsize,
  2111. type:
  2112. .(b
  2113. \&.sz \c
  2114. .i +N
  2115. .)b
  2116. where
  2117. .i N
  2118. is the size wanted in points.
  2119. The
  2120. .i "vertical spacing"
  2121. (distance between the bottom of most letters
  2122. (the
  2123. .i baseline )
  2124. between adjacent lines)
  2125. is set to be proportional
  2126. to the type size.
  2127. .pp
  2128. These pointsize changes are
  2129. .i temporary !!!
  2130. For example,
  2131. to reset the pointsize of basic text to twelve point, use:
  2132. .(b
  2133. \&.nr pp 12
  2134. \&.nr sp 12
  2135. \&.nr tp 12
  2136. .)b
  2137. to reset the default pointsize of
  2138. paragraphs,
  2139. section headers,
  2140. and titles respectively.
  2141. If you only want to set the names of sections in a larger pointsize,
  2142. use:
  2143. .(b
  2144. \&.nr sp 11
  2145. .)b
  2146. alone \*- this sets section titles
  2147. (e.g.,
  2148. .b "Point Sizes"
  2149. above)
  2150. in a larger font than the default.
  2151. .pp
  2152. A single word or phrase can be set in a smaller pointsize
  2153. than the surrounding text
  2154. using the
  2155. .b .sm
  2156. request.
  2157. This is especially convenient for words that are all capitals,
  2158. due to the optical illusion that makes them look even larger
  2159. than they actually are.
  2160. For example:
  2161. .(b
  2162. \&.sm UNIX
  2163. .)b
  2164. prints as
  2165. .sm UNIX
  2166. rather than
  2167. UNIX.
  2168. .pp
  2169. Warning:
  2170. changing point sizes
  2171. on the phototypesetter
  2172. is a slow mechanical operation.
  2173. On laser printers it may require loading new fonts.
  2174. Size changes
  2175. should be considered carefully.
  2176. .sh 2 "Quotes"
  2177. .pp
  2178. It is conventional when using
  2179. the typesetter to
  2180. use pairs of grave and acute accents
  2181. to generate double quotes,
  2182. rather than the
  2183. double quote character
  2184. (`\|"\|').
  2185. This is because it looks better
  2186. to use grave and acute accents;
  2187. for example, compare
  2188. "quote" to
  2189. ``quote''.
  2190. .pp
  2191. You may use the sequences
  2192. .b \e*(lq
  2193. and
  2194. .b \e*(rq
  2195. to stand for the left and right quote
  2196. respectively.
  2197. For example,
  2198. use:
  2199. .(b
  2200. \e*(lqSome things aren\(aat true
  2201. even if they did happen.\e*(rq
  2202. .)b
  2203. to generate the result:
  2204. .(b
  2205. .q "Some things aren't true even if they did happen."
  2206. .)b
  2207. As a shorthand,
  2208. the special font request:
  2209. .(b
  2210. \&.q "quoted text"
  2211. .)b
  2212. will generate
  2213. .q "quoted text" .
  2214. Notice that you must surround
  2215. the material to be quoted
  2216. with double quote marks
  2217. if it is more than one word.
  2218. .sh 0
  2219. .sp 1i
  2220. .b Acknowledgments
  2221. .pp
  2222. I would like to thank
  2223. Bob Epstein,
  2224. Bill Joy,
  2225. and Larry Rowe
  2226. for having the courage
  2227. to use the \-me macros
  2228. to produce non-trivial papers
  2229. during the development stages;
  2230. Ricki Blau,
  2231. Pamela Humphrey,
  2232. and Jim Joyce
  2233. for their help with the documentation phase;
  2234. peter kessler
  2235. for numerous complaints years after I was
  2236. .q done
  2237. with this project,
  2238. most accompanied by fixes
  2239. (hence forcing me to fix several small bugs);
  2240. and the plethora of people who have contributed ideas
  2241. and have given support for the project.
  2242. .sp 1i
  2243. This document was
  2244. \*G'ed
  2245. on \*(td
  2246. and applies to the version of the \-me macros
  2247. included with \*G version \*(MO.
  2248.