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