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