|
|
1.1 root 1: |make(rp)
2:
3: |insert(monk.mac)
4:
5: |comment(VOL2HEADER)|set_counter(page 239-1)|set_string(page_headers "'''")|set_string(even_headers "'Typing Documents on the UNIX System: Using Monk 0.6''\f(NImonk\fP'")|set_string(odd_headers "'\f(NImonk\fP''Typing Documents on the UNIX System: Using Monk 0.6'")|set_string(even_footers "_\\nP__UNIX Papers_")|set_string(odd_footers "'Research Tenth Edition''\\nP'")
6:
7: |environment(cwfigure;
8: new.line, verbatim on, file.information, line.spacing 1,
9: fill off, inline off, size -2, font cw, inline on, space -2,
10: blank.lines 1;
11: SPACE)
12: |comment<summary: cwfigure (a constant-width figure)>
13:
14: |environment(computeroutput;
15: new.line, verbatim on, file.information, line.spacing 1,
16: fill off, inline off, size -1, font cw, inline on, space -1,
17: blank.lines 1,
18: tab.stops "\w' 'u 2u*\w' 'u 3u*\w' 'u 4u*\w' 'u 5u*\w' 'u 6u*\w' 'u 7u*\w' 'u 8u*\w' 'u 9u*\w' 'u 10u*\w' 'u 11u*\w' 'u";
19:
20: tab.stops, blank.lines 1, SPACE)
21:
22: |author(name "S. L. Murrel", initials SLM, location MH, department 11229,
23: extension x5772, room 2C-578)
24:
25: |author(name "T. J. Kowalski", initials TJK, location MH, department 11229,
26: extension x2771, room 2C-568)
27:
28: |document(number 11229-851210-11TMS, file_case 25952, work_program 311401-2299)
29:
30: |document(number 11229-851210-11TMS, file_case 25952, work_program 311401-2199)
31:
32: |date(December 10, 1985)
33:
34: |title(Typing Documents on the |small(UNIX) System:
35: Using Monk 0.6)
36:
37: |insert(monk.cite)
38:
39: |begin(abstract)
40: |i<Monk> is a text-formatting program that produces high-quality
41: typeset output.
42: This paper, printed using |i<monk>,
43: describes how to produce letters, memos, release papers,
44: and technical memoranda complete with cover sheets.
45: We provide extensive details on the three easy steps
46: needed to prepare a document with |i<monk>:
47:
48: |begin(number_list)
49:
50: |item
51: Use the |i<monksample> command to get a copy of a sample document.
52:
53: |item
54: Edit the copy, replacing the sample title, author, and the text body.
55: Add sections, appendices, captioned figures, tables, and equations.
56: Select the document style:
57: character size and type, page width and length, line spacing,
58: and number of columns.
59:
60: |item
61: Format the document using the |i<monk> command,
62: sending the output to a 5620 or 630MTG
63: terminal or a printer.
64: |i<Monk> will automatically invoke
65: the table, picture, equation, graph,
66: |comment{index,}
67: and reference pre-processors in the correct order.
68:
69: |end(number_list)
70:
71: |end(abstract)
72:
73: |titlebox
74:
75: |style(two_column)
76:
77: |section(Introduction)
78:
79: Preparing any document involves positioning words and figures on each page.
80: Using a typewriter,
81: the margins, line spacing, and tab positions are selected by moving levers.
82: Text is positioned by moving the sheet of paper left, right, up or down.
83: Using a computer, the text is interspersed with commands that tell a
84: formatting program what to do.
85: |p
86: |i<Monk> is a new package of commands for producing
87: |s(AT&T) letters, memos, technical memoranda, and their cover sheets.
88: This paper will enable you to prepare documents using
89: |i<monk>.|reference<monk high-level text compiler>|reference<monk database>
90: |reference<using monk 1985>
91: You need to know how to log onto a computer and how to use an editor.
92: If you don't, see the |small(UNIX) Text Editing and Phototypesetting
93: Starter Package.|reference(Editing Phototypesetting Starter Package)
94: |blank_space(-1p)|comment{ZZZ: spacing kludge}
95: |section(Mixing Text and Commands)
96: |blank_space(-6p)|comment{ZZZ: spacing kludge}
97: |p
98: Using any text editor,
99: type normally.
100: However,
101: instead of skipping a line before paragraphs
102: type |cw(|sp(|)paragraph) or |cw(|sp(|)p).
103: |index(paragraphs)
104: This command will produce a blank line.
105: To indent,
106: use |cw<|sp(|)p(i)> or |cw<|sp(|)paragraph(indented)>;
107: to number,
108: use |cw<|sp(|)p(n)> or |cw<|sp(|)paragraph(num|sp(hyphenation)bered)>.
109: |p
110: There are other commands that let you select document style and character type
111: (e.g., double spacing and italics)
112: and include various sections and displays (e.g., chapters and tables).
113:
114: |section(Command Scope)
115:
116: |comment{|index(command delimiters)|index(italics)}
117:
118: Using |i<monk>,
119: the sentence ``Italicize the words in |sp(|s)italics(parentheses)'' produces
120: ``Italicize the words in |i(parentheses).''
121: All |i<monk> commands begin with the character `|sp(|s)'.
122: The command |cw(|sp(|)italics) selects the operation and
123: the parentheses delimit the words to be italicized.
124: There are seven pairs of delimiters:
125:
126: |begin(center)
127: |cw<(>...|cw<)>, |cw([)...|cw(]), |cw(<)...|cw(>), |cw({)...|cw(}), |cw(")...|cw("), |cw(')...|cw('), |cw(`)...|cw(')
128: |end(center)
129:
130: |p
131: Always choose delimiters so that the closing delimiter does not appear in the
132: text.
133: ``Italicize the equation |sp(|s)i(a = (b + c) / number)'' produces
134: ``Italicize the equation |i(a = (b + c) / number).''
135: The closing delimiter ')' is found after the letter `c',
136: so that the rest of the equation is not italicized.
137: The input ``Italicize the equation |sp(|s)i<a = (b + c) / number>'' will
138: correctly italicize the entire equation, |i<a = (b + c) / number>.
139: In contrast, when |i<monk> commands are inside other |i<monk> commands,
140: the delimiter pairs are not ambiguous.
141: ``Italicize and shrink this |sp(|s)small(|sp(|s)i(word) but only shrink the rest)''
142: produces
143: ``Italicize and shrink this |small(|i(word) but only shrink the rest).''
144: |p
145: There is a second form of delimiter |sp(Em dash)
146: when a command operates on a long text segment,
147: the commands |cw(|sp(|)begin) and |cw(|sp(|)end)
148: are used instead of brackets or quotes.
149: The text fragment
150:
151: |begin(cwfigure)
152: |sp(|s)begin(italics)
153: Four score and seven years ago our fathers
154: brought forth to this continent a new
155: nation, conceived in liberty and ...
156: |sp(|s)end(italics)
157: |end(cwfigure)
158:
159: appears in the final document as
160:
161: |begin(italics)
162: Four score and seven years ago our fathers brought forth to this continent
163: a new nation, conceived in liberty and ...
164: |end(italics)
165:
166: The commands |cw(|sp(|)begin) and |cw(|sp(|)end) delimit
167: the text operated on by the
168: command |cw(|sp(|)italics).
169:
170: |section(Document Commands)
171:
172: This section describes the commands that are specific to formatting
173: four types of documents:
174: letters, |small(AT&T) Bell Laboratories memoranda, technical memoranda,
175: and release papers.
176:
177: |environment(ret_address;
178: verbatim on, indent \n(U0u+\n(O0u-6n, fill off, here on;
179: minimum.lines)
180:
181: |subsection(Typesetting a Letter)
182:
183: For a letter, the input should begin as follows:
184:
185: |begin(cwfigure)
186: |sp(|)make(letter)
187: |sp(|)begin(ret_address)
188: |sp(|)s(AT&T) Bell Labs 2C-501
189: Murray Hill, N. J. 07974
190: |sp(|)end(ret_address)
191: |end(cwfigure)
192:
193: The first line specifies that the standard format for a letter should be used.
194: Then the return address, labeled |cw(ret_address), is delimited
195: by |cw(|sp(|)begin) and |cw(|sp(|)end) commands.
196: The formatter skips a couple of lines, indents, single spaces the address
197: itself, skips more lines, and then returns to the left hand margin
198: producing:
199:
200: |begin(figure)
201: |begin(ret_address)
202: |s(AT&T) Bell Labs 2C-501
203: Murray Hill, N. J. 07974
204: |end(ret_address)
205: |end(figure)
206:
207: The return address itself is not modified.
208: If the city, state, and zip code are input as separate lines,
209: they will appear that way in the final output:
210:
211: |begin(figure)
212: |begin(ret_address)
213: |s(AT&T) Bell Labs 2C-501
214: Murray Hill
215: N. J.
216: 07974
217: |end(ret_address)
218: |end(figure)
219:
220: |p
221: A letter consists of a sequence of standard groups:
222: a return address, date, recipient's address, greeting, body,
223: closing, and signature.
224: Accordingly,
225: the following prototype letter is available.
226:
227: |begin(cwfigure)
228: |insert(samples/letter.nx)
229: |end(cwfigure)
230:
231: |p
232: To copy this letter into a file named |cw<myfile> in your current directory,
233: type the |small(UNIX) command
234:
235: |begin(cwfigure)
236: monksample letter > myfile
237: |end(cwfigure)
238:
239: Using this prototype, it is not necessary for you to remember that
240: the label for return address is |cw(ret_address).
241: You need only recognize the English-like descriptions and
242: replace the sample text as appropriate.
243: Although any text editor will suffice, the large display of a visual editor
244: allows you to glance at the file and spot sample text.
245: |p
246: It is convenient to tailor the samples by entering your
247: address, closing, and signature and then saving the modified file.
248: This new file can then be used for all your letters simply
249: by adding an appropriate greeting, the recipient's address, and the body.
250: If you prepare letters for more than one person, you might want to maintain
251: a directory of tailored prototypes rather than begin with the
252: standard |i<monk> sample.
253:
254: |begin(cwfigure)
255: |insert(samples/tailor.nx)
256: |end(cwfigure)
257:
258: |p
259: When installed,
260: |i<monk> is configured to use local printers as standard output
261: devices.|dagnote{Specify the printer that you have permission to use
262: by defining |s<LPDEST> in your |i<.profile>,
263: e.g., |cw<LPDEST=crete; export LPDEST>.}
264: You will need to talk to someone using or maintaining your computer system
265: to find out what and where your local standard printer is.
266: |p
267: To run off this memo on the standard printing device,
268: type |cw(monk myfile).
269: To send your output to a printing device other than the standard,
270: use the |cw<|sp(minus)S>|i<dest> and |cw<|sp(minus)T>|i<font> options.
271: To preview postscript output on a |s(AT&T) 5620 or 630MTG terminal, type
272: |cw(monk |sp(minus)Tpost |sp(minus)Sproof myfile).
273: Devices and fonts will vary with your location,
274: but commonly available types include:
275:
276: |begin(figure)
277: |begin(table)
278: center;
279: c1FCW lfB
280: l1FCWp-2 l.
281: .sp .5
282: |sp(minus)S|i(dest) Sends Output To Device |i(dest)
283: .sp .25
284: _
285: .sp .25
286: |sp(minus)Sapsend Linotronic 200P, see |i(apsend)(1)
287: |sp(minus)Sd202 Mergenthaler Linotronic 202, see |i(d202)(1)
288: |sp(minus)Si300 Spooling for |s(EXPTOOLS), see |i(i300)(1)
289: |sp(minus)Slp Spooling mechanism, see |i(lp)(1) (default)
290: |sp(minus)Slpr Spooling at Allentown, see |i(lpr)(1)
291: |sp(minus)Sproof 5620 or 630MTG terminal, see |i(proof)(9.1)
292: |sp(minus)Sprt Spooling at computer centers, see |i(prt)(1)
293: |sp(minus)Sthink Thinkjet, see |i(thinkblt)(9.1)
294: |sp(minus)S|sp(minus) Standard output
295: .sp
296: .T&
297: c1FCW lfB
298: l1FCWp-2 l.
299: .sp .5
300: |sp(minus)T|i(fonts) Selects Typesetter Or Terminal |i(fonts)
301: .sp .25
302: _
303: .sp .25
304: |sp(minus)T202 Mergenthaler Linotronic 202
305: |sp(minus)Taps Autologic |s(APS-5)
306: |sp(minus)Ti10 Imagen 10 printer
307: |sp(minus)Ti300 Imagen 300 printer
308: |sp(minus)Tim300 Imagen 300 printer at Liberty Corner
309: |sp(minus)Tpost PostScript|sp(registered) printer (default)
310: |sp(minus)Tthink Think jet printer
311: |end(table)
312: |end(figure)
313:
314: |p
315: If |s(TYPESETTER) is set and exported, then it determines the typesetter
316: or terminal fonts used in preparing the output.
317: Be careful to type |cw(monk |sp(minus)Tpost |sp(minus)Sapsend myfile)
318: or |cw(monk |sp(minus)Taps |sp(minus)Sprt myfile)
319: |b(only) when you intend to send
320: final copy to the high-quality, high-priced phototypesetter.
321:
322: |p
323: When |i<monk> is run, the individualized prototype letter will appear as
324: a full size version of the page below.
325: This is an excerpt of the sample's output,
326: scaled and included using PostScript.
327: .br
328: |comment< to make the postscript output the column width: x 3.1i, y 7i >
329: .ne 14v
330: |begin(ruled.display)
331: |postscript(file "samples/tailor.ps",
332: x 4.2i, y 7i, xoffset -.5i, yoffset -1i)
333: |blank_space(13v)
334: |end(ruled.display)
335: |blank_space(1v)
336: ..........
337:
338: |subsection(Typesetting a Memorandum)
339:
340: Preparing a memorandum is similar to preparing a letter.
341: Memoranda require a title, more information about the author,
342: and the document itself.
343: The information you provide is automatically arranged at the top of the page.
344: |p
345: Type
346:
347: |begin(cwfigure)
348: monksample memo > myfile
349: |end(cwfigure)
350:
351: to get the following prototype:
352:
353: |begin(cwfigure)
354: |insert(samples/memo.nx)
355: |end(cwfigure)
356: |blank_space(-1)|blank_space(-4p)|comment<ZZZ kludge - blankline at top of
357: column - trailing size change after cwfigure >
358: |p
359: The |cw<|sp(|)make> command asks |i<monk> to format the document as a memo.
360: The information about each author is given in a
361: separate |cw<|sp(|)author> command:
362: name, initials, location, department, extension, and room number.
363: Each instance of |cw<|sp(|)document> gives the document information for
364: the corresponding author.
365: Author, document, title, and date may appear in any order,
366: but must precede the command |cw<|sp(|)titlebox>,
367: which organizes, formats, and outputs all this information.
368: |p
369: After the titlebox comes the body of the memo,
370: which consists of paragraphs
371: separated by |cw<|sp(|)p>, simple font changes, and figures.
372: After the body comes the signature, any necessary notations,
373: and approvals.
374: This sample produces the following memo:
375: .br
376: .ne 20v
377: |begin(ruled.display)
378: |postscript(file "samples/memo.ps",
379: x 4.2i, y 7i, xoffset -.5i, yoffset -.9i)
380: |blank_space(19v)
381: |end(ruled.display)
382: |blank_space(1v)
383: ...........
384: |p
385: To omit information, simply delete the appropriate |i<monk> command.
386: Delete the entire line to omit notations or approvals.
387: To omit an author's location, omit the relevant labels and associated numbers,
388: e.g., |cw{|sp(|)author(name "W. H. MacWilliams", initials WHM, department 1344)}.
389:
390: |subsection(Typesetting a Technical Memorandum)
391:
392: This section describes how to prepare a technical memorandum.
393: The example below is the skeleton of the file that produced the previous |i(tm) version
394: of this document, excluding cover sheet information.
395: This prototype consists of the declaration of the document type,
396: document numbers,
397: date,
398: authors, title, abstract, document body, appendices, and references.
399: It can be copied with the command |cw(monksample tm > myfile).
400:
401: |comment{entire tm here or simply body, ending before cover sheet info}
402:
403: |begin(cwfigure)
404: |insert(samples/tmbody.nx)
405: |end(cwfigure)
406: |p
407: The first line should specify the document type.
408: After that the order is flexible,
409: with the one restriction that all the
410: component information be available when larger units, such as the
411: titlebox, are printed.
412: Thus the author, date, and document information must be specified
413: before the command
414: |cw(|sp(|)titlebox), because it uses that information to produce
415: the standard header at the top of technical memoranda.
416: Note that the same |cw<|sp(|)titlebox> command produces different output
417: depending on the document type specified.
418: |p
419: The title is not filled, so that newlines entered by the author are preserved:
420: here |cw<Using Monk 0.3> appears as
421: the second line of the title.|dagnote<In unfilled text,
422: input lines are reproduced unchanged in the output;
423: in filled text, words from successive input lines may be combined to ensure
424: maximum length lines in the output.>
425: This is the first page produced by the |i<tm> input sample, scaled
426: to fit into the column.
427: The second page of the output provides the formatted reference list.
428: .br
429: .ne 25v
430: |begin(ruled.display)
431: |postscript(file "samples/tmbody.ps",
432: x 4.2i, y 7i, xoffset -.5i, yoffset -.9i)
433: |blank_space(24v)
434: |end(ruled.display)
435: |blank_space(1v)
436: ...........
437: |p
438: The commands |cw(|sp(|)author) and |cw(|sp(|)document)
439: belong to a type we have not previously discussed.
440: They allow you to specify a collection of information about a given item.
441: The first instance of |cw(|sp(|)author) specifies the name, initials,
442: location, department, extension, and room number of the first author.
443: The first instance of |cw(|sp(|)document) gives the document information
444: for the first author.
445: Authors and documents are linked as they appear, so that
446:
447: |begin(cwfigure)
448: |sp(|)author(name "S. L. Murrel", initials SLM,
449: location MH, department 11229)
450: |sp(|)author(name "T. J. Kowalski", location MH,
451: initials TJK, department 11229)
452: |sp(|)document(number 11229-851210-11TMS,
453: file_case 25952, work_program 311401-2299)
454: |sp(|)document(number 11229-851210-11TMS,
455: file_case 25952, work_program 311401-2199)
456: |end(cwfigure)
457:
458: is equivalent to the ordering given in the |i(tm) above.
459: Note that in these examples only part of the author information is included:
460: the room and extension numbers were omitted.
461: Any information can be omitted simply by deleting the corresponding |i<monk>
462: labels, e.g., |cw<room> and |cw<extension>.
463: Monk will try to format the information given gracefully.
464: |p
465: Additional information is needed to produce a standard |s<AT&T> cover sheet:
466:
467: |begin(cwfigure)
468: |insert(samples/tmcs.nx)
469: |end(cwfigure)
470:
471: Again, this information can appear anywhere in the document as long as it
472: precedes the command |cw(|sp(|)cover_sheet).
473: Following local convention, keywords are filled, while the distribution lists
474: are not.
475: Although the title was not filled in the titlebox,
476: it is filled on the cover sheet because of space limitations.
477: |p
478: In producing the cover sheet, |i<monk> automatically calculates the numbers of
479: tables, figures, references,
480: as well as text pages, other pages, and total pages.
481: Use the command |cw<|sp(|)other> to mark the end of the text body and the
482: beginning of attachments.
483: |i<Monk> needs it to correctly distinguish text from other pages.
484: If there are any pages that are not included in this input file, you
485: can add to the counts using the command |cw<|sp(|)add_totals>.
486: For example,
487: if there is an additional attachment page that is not a table or figure,
488: then the command |cw<|sp(|)add_totals(other 1)> suffices.
489: You should never have to use the complete form of the command:
490: |cw<|sp(|)add_totals(text 0, tables 0, figures 1, references 11,
491: other 2)>.
492: This command means that you are adding 2 additional pages by hand,
493: which include one figure and eleven references.
494: The counts of text pages and tables are untouched.
495: |p
496: There are six commands specific to the |s(AT&T B)ell |s(L)abs cover sheet
497: that provide distribution information.
498: Use |cw<|sp(|)mercury> to specify the company-wide announcements
499: that should include
500: the abstract of this document:
501: |cw<chm>, |cw<cmm>, |cw<cmp>, |cw<elc>, |cw<lfs>, |cw<man>, |cw<mas>, |cw<mkt>,
502: and |cw<phy>.
503: Use the |i<monk> command |cw<|sp(|)distribute_complete_memo> to
504: list individu\%als who should receive the complete memo and
505: |cw<|sp(|)distribute_cover_sheet>
506: to list those who should receive only the cover sheet.
507: The command |cw<|sp(|)att> gives relevant |s(AT&T) release information:
508: |cw<is_release> marks the |i<yes> or |i<no> box
509: as specified by its argument.
510: |cw<|sp(|)director_name> identifies the director of the first author.
511: Finally, the command |cw<|sp(|)cover_sheet> prints the following cover sheet.
512: Note that this sample produces four pages:
513: one page of text, one page of references, and two pages of cover sheet.
514: .br
515: .ne 26v
516: |begin(ruled.display)
517: |postscript(file "samples/tmcs.ps",
518: x 3.4i, y 7i, xoffset -.1i, yoffset -1.1i)
519: |blank_space(25v)
520: |end(ruled.display)
521: |blank_space(1v)
522: ...........
523:
524: |subsection(Typesetting a Release Paper)
525:
526: There is a |i<monk> sample for release papers, which can be modified
527: in the same way as
528: the documents already discussed.
529: However, you may often want to convert a technical memorandum
530: into a release paper.
531: To do so, change the first line from
532: |cw<|sp(|)make(tm)> to |cw<|sp(|)make(rp)>
533: and then remove or comment out (see Section |remember(comment_section))
534: the information specific to the
535: |i<tm> style:
536:
537: |begin(bullet_list)
538: |item |cw<other>
539: |item |cw<add_totals>
540: |item |cw<mercury>
541: |item |cw<distribute_cover_sheet>
542: |item |cw<distribute_complete_memo>
543: |item |cw<cover_sheet>
544: |item |cw<att>
545: |item |cw<signature>
546: |item |cw<director_name>
547: |end(bullet_list)
548:
549: |section(Content Formatting Commands)
550:
551: For any document type, it is possible to format section titles,
552: figure captions, footnotes, and two-column output.
553: It is possible to store page numbers, section numbers or figure numbers
554: for later use.
555: An interface is provided to existing routines that produce
556: tabular output, equations, citations, and reference lists.
557: This section describes the relevant commands.
558:
559: |subsection(Comments)
560: |save(comment_section)
561:
562: Comments are valuable notations by and for the person preparing a document.
563: They can be used
564: to temporarily omit a section,
565: to mark a section that needs work or information,
566: and to retain an alternative word or phrase.
567: Anything that appears within the delimiters of a |cw<|sp(|)comment>
568: is not processed as part of the document:
569: |i<monk> commands are ignored, and text does not appear in the final output.
570:
571: |subsection(Spacing)
572:
573: |comment{
574: |subsection(Spacing and Tabs)
575: You can start a new page, leave vertical blank space, and control tab stops.}
576:
577: You can start a new page or leave vertical blank space using these commands.
578:
579: |begin(table)
580: center;
581: lf5 2 l.
582: |sp(|s)new_page begins a new page
583: |sp(|s)new_column begins a new column
584: |sp(|s)blank_space leaves a blank line
585: |sp(|s)blank_space(3) leaves 3 blank lines
586: |sp(|s)blank_space(1.5i) leaves 1.5 inches
587: |sp(|s)blank_space(|sp(minus)1) moves back one line
588: |comment{
589: |sp(|s)tab_stops(1.5i 4.25i 5.5i 6.75i) sets tab stops
590: |sp(|s)tab_stops restores previous tab stops}
591: |end(table)
592:
593: |subsection(Positioning Text: Indenting and Centering)
594:
595: Indenting and centering are the most common ways of positioning text.
596: The input text
597:
598: |begin(cwfigure)
599: |sp(|)indent(begins a new line and indents
600: the left hand margin as long as it applies
601: for a single line, a group of lines,
602: or an entire paper.
603: |sp(|)indent<Multiple commands will
604: indent progressively.>)
605: |end(cwfigure)
606:
607: produces the following output:
608:
609: |indent(begins a new line and indents
610: the left hand margin as long as it applies
611: for a single line, a group of lines,
612: or an entire paper.
613: |indent<Multiple commands will
614: indent progressively.>)
615: |p
616: The command |cw<|sp(|)center> begins a new line and
617: centers each line of text within its delimiters.
618: The input, taken from Monty Python,
619:
620: |begin(cwfigure)
621: |sp(|)begin(center)
622: I'm a lumberjack and I'm okay,
623: I sleep all night and I work all day.
624: I cut down trees, I eat my lunch,
625: I go to the lavat'ry,
626: On Wednesdays I go shopping and have
627: buttered scones for tea.
628: |sp(|)end(center)
629: |end(cwfigure)
630:
631: produces
632:
633: |begin(figure)
634: |begin(center)
635: I'm a lumberjack and I'm okay,
636: I sleep all night and I work all day.
637: I cut down trees, I eat my lunch,
638: I go to the lavat'ry,
639: On Wednesdays I go shopping and have
640: buttered scones for tea.
641: |end(center)
642: |end(figure)
643:
644: |p
645: In contrast, the command |cw<|sp(|)center_block> centers the entire figure
646: as a block.
647: All the lines are left-justified and
648: the figure is centered based on the width of the longest line.
649: It produces
650:
651: |begin(figure)
652: |begin(center_block)
653: I'm a lumberjack and I'm okay,
654: I sleep all night and I work all day.
655: I cut down trees, I eat my lunch,
656: I go to the lavat'ry,
657: On Wednesdays I go shopping and have
658: buttered scones for tea.
659: |end(center_block)
660: |end(figure)
661:
662: |p
663: Multi-line quotations are appropriately indented and offset by the
664: command |cw<|sp(|)quotation>.
665:
666: |quotation<Four score and seven years ago our fathers brought forth
667: to this continent a new nation, conceived in liberty and dedicated to
668: the proposition that all men are created equal.>
669:
670: |subsection(Document Styles)|save(style_section)
671:
672: By default,
673: all documents are single-spaced and single column.
674: Page width is 6 inches; length is 11 inches.
675: The font family is |i{times};
676: the font size is 10p on a vertical spacing of 12p.
677: Paragraphs skip a line and begin the text flush with the left margin.
678: |p
679: You can change any of these defaults using the |cw(|sp(|)style) command.
680: The command |cw<|sp(|)style( page_width 7i)> sets the page width to 7 inches.
681: To get the maximum page width on most output devices, type:
682: |cw<|sp(|)style(page_offset 0, page_width 8.5i)>.
683: The |cw(page_length) and |cw(font_size) can be set in a similar manner.
684: |p
685: |cw<|sp(|)style(font_size 14)> changes the default font to size 14 to print
686: out your papers for your grandparents or to prepare invitations to a party.
687: |cw(|sp(|)big) or |cw(|sp(|)small)
688: will still provide one size bigger or smaller, respectively.
689: |table_caption(The alphabet in common type families)
690: |save(The alphabet in common type families)
691: |begin(table)
692: l l l
693: lfI lfI lfI
694: lfB lfB lfB
695: l l l
696: lf2 lf2 lf2
697: lf3 lf3 lf3
698: l l l
699: lf2 lf2 lf2
700: lf3 lf3 lf3 .
701: times roman abcdefghijklm...uvwxyz
702: italics abcdefghijklm...uvwxyz
703: bold abcdefghijklm...uvwxyz
704: |style(font_family palatino)
705: palatino roman abcdefghijklm...uvwxyz
706: italics abcdefghijklm...uvwxyz
707: bold abcdefghijklm...uvwxyz
708: |style(font_family helvetica)
709: helvetica roman abcdefghijklm...uvwxyz
710: italics abcdefghijklm...uvwxyz
711: bold abcdefghijklm...uvwxyz
712: |end(table)
713: |style(font_family times)
714: |p
715: Font families provide complementary styles for each of the four fonts:
716: bold, italics, roman, and cw.
717: The standard font family is times.
718: Alternative font families include
719: palatino, helvetica, bembo, optima, souvenir, and cw,
720: but not all families are available on all output devices.
721: Some examples are shown in Table |remember(The alphabet in common type families).
722: To select helvetica, type |cw<|sp(|)style( font_family helvetica)>.
723: |p
724:
725: |style(double_space)
726:
727: |cw<|sp(|)style(double_space)> double spaces the text, while
728: |cw<|sp(|)style( single_space)> restores single spacing.
729:
730: |style(single_space)
731:
732: You can change the paragraph style throughout the rest of your document
733: by typing the command |cw<|sp(|)style(paragraph_style indented)> or
734: |cw<|sp(|)style(paragraph_style numbered)>,
735: after which the simple command |cw<|sp(|)p>
736: will produce indented or numbered paragraphs.
737: To indent or number a single paragraph,
738: use |cw<|sp(|)p(i)> or |cw<|sp(|)p(n)>, respectively.
739: To restore the original style paragraph,
740: type |cw<|sp(|)style( paragraph_style flushed)>.
741: |p
742: The command |cw<|sp(|)style(one_column)> begins formatting text in one column.
743: The command |cw<|sp(|)style(two_column)> restores two column formatting.
744:
745: |subsection(Fonts)
746:
747: |i<Monk> currently provides abbreviated commands for
748: four type faces and two type sizes.
749: |cw(|sp(|)bold) or |cw(|sp(|)b) makes the enclosed text |b(bold).
750: |cw(|sp(|)italics) or |cw(|sp(|)i) produces |italics(italicized text),
751: while |cw(|sp(|)roman) or |cw(|sp(|)r) restores the roman character set.
752: The command |cw<|sp(|)constant_width> or |cw<|sp(|)cw>
753: |cw(selects a font that resembles low quality line printer
754: output and is intended only for examples of such output).
755: |p
756: When fonts are embedded, the innermost dominates.
757: For example,
758: |cw(|sp(|)italics<Italics flourish around the |sp(|)roman[roman] text>) produces
759: |italics<Italics flourish around the |roman[roman] text>.
760: If an output device is not able to italicize, then it will underline.
761: Because italics look better, it is always preferable to request them
762: so that the document will look its best on the available printing device.
763: However, it is possible to specify underlining using |cw(|sp(|)underline) or |cw(|sp(|)u).
764: |p
765: |cw(|sp(|)big) makes the font size |big(bigger),
766: while |cw(|sp(|)small) makes the font size |small(smaller).
767: These can be nested, so that |cw<|sp(|)big(|sp(|)big(this is big))> produces
768: |big(|big(this is big)).
769: However, |cw<|sp(|)big> and |cw<|sp(|)small> are designed for in-line font changes;
770: they do not change the vertical spacing.
771: To change the size of a block of text, use the |cw<|sp(|)style> command
772: (see Section |remember(style_section)).
773:
774: |subsection(Special characters)
775: |save(special_section)
776:
777: |i<Monk> provides a long list of special characters, the appearance of which
778: is ultimately determined by the output device.
779:
780: With the command |cw<|sp(|)sp>,
781: the user can print out the |i<monk> command character |cw(|sp(|s)),
782: Greek letters, and mathematical symbols.
783: |p
784: Here is a partial list of the fancy symbols
785: that appear in Appendix |remember(special_appendix):
786: |sp{/} |sp{minus} |sp{\}
787: |sp{.} |sp{degree} |sp{bullet}
788: |sp{copyright} |sp{registered} |sp{TM}
789: |sp{|} |sp{bold vertical}
790: |sp{dagger} |sp{section}
791: |sp{rhand} |sp{lhand}
792: |sp{hyphen} |sp{underrule}
793: |sp{open quote} |sp{close quote}
794: |sp{grave} |sp{cedilla} |sp{lower case umlaut} |sp{upper case umlaut}
795: |sp{alpha} |sp{beta} |sp{gamma} |sp{delta} |sp{epsilon}
796: |sp{+-} |sp{>=} |sp{<=} |sp{!=} |sp{-wig} |sp{wig}
797: |sp{times} |sp{divide} |sp{prop}
798: |sp{integral} |sp{partial}
799: |sp{not} |sp{or} |sp{rceil}
800: |sp{square} |sp{del} |sp{empty} |sp{member}
801: |sp{isuperset} |sp{cap}
802: |sp{->} |sp{uarrow} |sp{darrow}
803: |sp{cent} |sp{quarter} |sp{3quarter}
804: |sp{mu} |sp{nu} |sp{xi} |sp{omicron}
805: |sp{pi} |sp{ff} |sp{ffi} |sp{ffl} |sp{TEX} |sp{LATEX}.
806: |p
807: |cw<|sp(|)sp> can also be used to control spacing and carriage movement
808: precisely.
809: There are spaces of five different widths,
810: shown below opposite the commands that produce them.
811:
812: |comment[|begin(verbatim)
813: |cw<|sp(|)sp{zero width space}> `|sp{zero width space}'
814: ]
815: |begin(cwfigure)
816: .ta 1.6i
817: |sp(|)sp{space} |r<|big<|big<`|sp{space}'>>>
818: |sp(|)sp{digit space} |r<|big<|big<`|sp{digit space}'>>>
819: |sp(|)sp{narrow space} |r<|big<|big<`|sp{narrow space}'>>>
820: |sp(|)sp{half narrow space} |r<|big<|big<`|sp{half narrow space}'>>>
821: |sp(|)sp{zero width space} |r<|big<|big<`|sp{zero width space}'>>>
822: .ta
823: |end(cwfigure)
824:
825: |p
826:
827: |style(double_space)
828:
829: The carriage can be moved up and down:
830: |cw<|sp(|)sp{up}> moves |sp{up}up,|sp{down}
831: while |cw<|sp(|)sp{reverse}> moves
832: |sp{reverse}up|sp{down}|sp{down}by twice as much.
833: The command |cw<|sp(|)sp{down}> moves |sp{down}down.|sp{up}
834:
835: |style(single_space)
836:
837: |p
838: |cw<|sp(|)sp{break and spread}> pads the current line according to the document
839: style and breaks to the next line.
840: To force hyphenation at a particular position in a word, use
841: |cw<|sp(|)sp{hyphenation}>.
842: |cw<|sp(|)sp{tab}> generates horizontal motion to the next tab stop;
843: |cw<|sp(|)sp{leader}> generates a string of periods to the next tab stop.
844:
845: |subsection(Headings)
846:
847: |comment<|subsection(Hyphenation and Justification)>
848: |comment<|subsection(Section headings)>
849:
850: |subsubsection(Numbered headings.)
851:
852: |cw<|sp(|)chapter> starts a new page; leaves a blank space;
853: puts ``Chapter |i<n>'' against the right hand margin;
854: skips more space;
855: puts the title against the right hand margin;
856: and skips more space before beginning the text body.
857: No chapters appear in this document.
858: The commands
859: to declare the current section, subsection, and subsubsection include:
860:
861: |begin(cwfigure)
862: |sp(|)section(Content Formatting Commands)
863: |sp(|)subsection(Headings)
864: |sp(|)subsubsection(Numbered headings.)
865: |end(cwfigure)
866:
867: The first appendix at the end was produced by
868: |cw<|sp(|)appendix(List of Commands)>.
869: |paragraph(numbered)
870: This numbered paragraph is produced by the command
871: |cw<|sp(|)paragraph(numbered)>,
872: which may be abbreviated as |cw<|sp(|)paragraph(n)> or |cw<|sp(|)p(n)>.
873:
874: |subsubsection(Unnumbered headings.)
875:
876: The analogous unnumbered headings produce the same spacing but omit
877: heading names, e.g. chapter, and numerical labels.
878: Chapter titles remain right justified,
879: and appendix titles are still centered;
880: but the various section titles are now flush with the left margin.
881: |cw<|sp(|)unnumbered_chapter> is useful for preface and acknowledgement
882: pages.
883: Available commands include:
884:
885: |begin(cwfigure)
886: |sp(|)unnumbered_chapter(Preface)
887: |sp(|)unnumbered_section(|small[SECTION])
888: |sp(|)unnumbered_subsection(Subsection)
889: |sp(|)unnumbered_subsubsection(Subsubsection.)
890: |sp(|)unnumbered_appendix(|small[APPENDIX])
891: |end(cwfigure)
892:
893: |p(f)
894: There are flushed and indented unnumbered paragraphs.
895: The indented paragraphs are used throughout this paper,
896: except for this paragraph,
897: which is produced using the command |cw<|sp(|)p(f)>.
898: The commands to skip a line and begin the text flush with the left margin
899: include:
900:
901: |begin(cwfigure)
902: |sp(|)paragraph(f)
903: |sp(|)p(f)
904: |sp(|)paragraph(flushed)
905: |sp(|)p(flushed)
906: |end(cwfigure)
907:
908: The commands to indent the first line of the paragraph and
909: produce spacing identical to the flushed paragraph include:
910:
911: |begin(cwfigure)
912: |sp(|)paragraph(i)
913: |sp(|)p(i)
914: |sp(|)paragraph(indented)
915: |sp(|)p(indented)
916: |end(cwfigure)
917: |blank_space(-1)
918:
919: |subsubsection(Paragraphs.)
920:
921: The command |cw(|sp(|)paragraph) or its abbreviation |cw(|sp(|)p)
922: is used throughout this paper to produce the default paragraph style.
923: In this paper the normal default,
924: |cw(flushed), was changed through use of the |cw<|sp(|)style> command to |cw(indented)
925: (see Section |remember(style_section)).
926:
927: |subsection(Setting page, heading and figure numbers)
928:
929: Page, heading, figure, and table numbers can be changed by the authors.
930: |index(set page numbers)|index(page numbers)
931: |index(section numbers)|index(section counters)
932: Set the current page counter to three using
933: the command |cw<|sp(|)set_counter(page 3)>.
934: At the next page boundary the page number will be incremented to four.
935: The command |cw<|sp(|)set_counter( table 12)>
936: sets the current table number to 12.
937: Multiple counters can be set with a single command:
938: |cw<|sp(|)set_counter(page 10, chapter 4, section 3, subsection 1)>.
939: Available commands include:
940:
941: |begin(cwfigure)
942: |sp(|)set_counter(page 3)
943: |sp(|)set_counter(chapter 4)
944: |sp(|)set_counter(section 1)
945: |sp(|)set_counter(subsection 9)
946: |sp(|)set_counter(subsubsection 3)
947: |sp(|)set_counter(paragraph 0)
948: |sp(|)set_counter(appendix 3)
949: |sp(|)set_counter(footnote 17)
950: |sp(|)set_counter(note 122)
951: |sp(|)set_counter(figure 8)
952: |sp(|)set_counter(table 0)
953: |end(cwfigure)
954:
955: |p
956: Care must be taken in positioning all these commands:
957: if you want to change a section number, then you must position the
958: |cw<|sp(|)set_counter> command before the section itself
959: so that the numbered title will be correct.
960: To number the next section four, you must type
961: |cw<|sp(|)set_counter(section 3)> before the |cw<|sp(|)section> command,
962: because the section number will be incremented
963: when the |cw<|sp(|)section> command itself is read.
964: Similarly,
965: if you want the page number in headers and footers to display a new value,
966: then the value must be changed before the break to the new page occurs.
967: To set the next page to page number three,
968: the command |cw<|sp(|)set_counter(page 2)> must appear on the current page.
969: |p
970: Once a value is set, the computer will use that number and increment it
971: appropriately; but if it is set wrong, it will remain wrong.
972: If you change counters, you are responsible for
973: insuring consistency and correctness.
974:
975: |subsection(Setting page headers and footers)
976:
977: Both page headers and footers can be set using the |cw<|sp(|)set_string> command
978: as follows:
979:
980: |begin(cwfigure)
981: |sp(|)set_string(page_headers "'left'center'right'")
982: |sp(|)set_string(even_headers "'left'center'right'")
983: |sp(|)set_string(odd_headers "'left'center'right'")
984: |sp(|)set_string(page_footers "'left'center'right'")
985: |sp(|)set_string(even_footers "'left'center'right'")
986: |sp(|)set_string(odd_footers "'left'center'right'")
987: |end(cwfigure)
988:
989: |cw<Page_headers>, |cw<even_headers>, and |cw<odd_headers> set the headers
990: on all pages, even pages, and odd pages, respectively.
991: |index(headers)|index(page headers)
992: Page headers appear above the even and odd headers.
993: All headers consist of three strings, any of which may be blank or long
994: enough to overlap.
995: Any character, can be used to delimit the strings.
996: The strings |i(left), |i(center), and |i(right) are left-justified, centered,
997: and right-justified, respectively.
998: Parallel commands serve
999: to specify page footers.|index(footers)|index(page footers)
1000:
1001: |comment<|subsection(Grouping text - Displays)>
1002:
1003: |subsection(Lists)
1004:
1005: There are nine types of lists, which differ only in the labeling of list items:
1006:
1007: |begin(cwfigure)
1008: |sp(|)number_list
1009: |sp(|)A_list
1010: |sp(|)a_list
1011: |sp(|)I_list
1012: |sp(|)i_list
1013: |sp(|)p_number_list
1014: |sp(|)p_a_list
1015: |sp(|)dash_list
1016: |sp(|)bullet_list
1017: |end(cwfigure)
1018:
1019: A simple numbered list is created by the following commands:
1020:
1021: |begin(cwfigure)
1022: |sp(|)begin(number_list)
1023: |sp(|)item first item
1024: |sp(|)item second item is on two lines in the
1025: input, but will be filled in the output
1026: |sp(|)item third
1027: |sp(|)end(number_list)
1028: |end(cwfigure)
1029:
1030: |p
1031: |cw<|sp(|)A_list> items are marked with capital letters;
1032: |cw<|sp(|)a_list> with lower-case letters followed by '|cw<)>'.
1033: |cw<|sp(|)I_list> items are marked with upper-case roman numerals;
1034: |cw<|sp(|)i_list> with lower-case roman numerals followed by '|cw<)>'.
1035: Number and lower-case letter labels are enclosed in parentheses in
1036: |cw<|sp(|)p_number_list> and |cw<|sp(|)p_a_list>, respectively.
1037: Bullets or dashes label the items in a |cw<|sp(|)bullet_list>
1038: or a |cw<|sp(|)dash_list>, respectively.
1039: |p
1040: Multi-level lists of up to six levels can be built by putting lists inside
1041: lists.
1042: A standard outline format of six levels consists of an outer |cw<|sp(|)I_list>,
1043: an |cw<|sp(|)A_list>, a |cw<|sp(|)number_list>, an |cw<|sp(|)a_list>,
1044: an inner |cw<|sp(|)number_list>, and a |cw<|sp(|)p_a_list>.
1045: The following produces, in outline format, a description of two kingdoms.
1046:
1047: |begin(cwfigure)
1048: |sp(|)begin(I_list)
1049: |sp(|)item Animal Kingdom
1050: |sp(|)begin(A_list)
1051: |sp(|)item Arthropods
1052: |sp(|)begin(number_list)
1053: |sp(|)item Trilobites
1054: |sp(|)item Insects
1055: |sp(|)end(number_list)
1056: |sp(|)item Chordates
1057: |sp(|)begin(number_list)
1058: |sp(|)item Vertebrates
1059: |sp(|)begin(a_list)
1060: |sp(|)item Birds
1061: |sp(|)item Reptiles
1062: |sp(|)item Mammals
1063: |sp(|)begin(number_list)
1064: |sp(|)item Marsupials
1065: |sp(|)item Monotremes
1066: |sp(|)begin(p_a_list)
1067: |sp(|)item platypus
1068: |sp(|)item echidna
1069: |sp(|)end(p_a_list)
1070: |sp(|)item Placental mammals
1071: |sp(|)begin(p_a_list)
1072: |sp(|)item Cetacea
1073: |sp(|)item Primates
1074: |sp(|)end(p_a_list)
1075: |sp(|)end(number_list)
1076: |sp(|)end(a_list)
1077: |sp(|)item Notocords
1078: |sp(|)end(number_list)
1079: |sp(|)item Mollusks
1080: |sp(|)end(A_list)
1081: |sp(|)item Plant Kingdom
1082: |sp(|)end(I_list)
1083: |end(cwfigure)
1084:
1085: |begin(I_list)
1086: |item Animal Kingdom
1087: |begin(A_list)
1088: |item Arthropods
1089: |begin(number_list)
1090: |item Trilobites
1091: |item Insects
1092: |end(number_list)
1093: |item Chordates
1094: |begin(number_list)
1095: |item Vertebrates
1096: |begin(a_list)
1097: |item Birds
1098: |item Reptiles
1099: |item Mammals
1100: |begin(number_list)
1101: |item Marsupials
1102: |item Monotremes
1103: |begin(p_a_list)
1104: |item platypus
1105: |item echidna
1106: |end(p_a_list)
1107: |item Placental mammals
1108: |begin(p_a_list)
1109: |item Cetacea
1110: |item Primates
1111: |end(p_a_list)
1112: |end(number_list)
1113: |end(a_list)
1114: |item Notocords
1115: |end(number_list)
1116: |item Mollusks
1117: |end(A_list)
1118: |item Plant Kingdom
1119: |end(I_list)
1120:
1121: |subsection(Inserting other files)
1122:
1123: Other files may be inserted using the command |cw<|sp(|)insert>.|index(insert)
1124: These files will also be processed by |i<monk> and
1125: may in turn insert other files.
1126: Loops will indeed cause disaster.
1127: A file that will not be processed may also be included
1128: using the |cw<|sp(|)source> command.|index(source)
1129:
1130: |subsection(Figures)
1131:
1132: The lumberjack poem above was formatted as a figure.
1133: Figures are printed with blank space above and below and can be split
1134: across a page boundary.
1135: Lines are not filled.
1136: If you want some lines to be filled, put them within the delimiters of the
1137: command |cw<|sp(|)text>.
1138: |cw<|sp(|)figure_caption> centers and labels the caption.
1139: Given
1140:
1141: |begin(cwfigure)
1142: |sp(|)begin(figure)
1143: Like the lumberjack poem above,
1144: this text is within a |sp(|)cw<|sp(|)sp(|sp(|))figure>
1145: command.
1146: |sp(|)end(figure)
1147: |sp(|)figure_caption(This is a figure caption).
1148: |end(cwfigure)
1149:
1150: |i<monk> produces
1151:
1152: |begin(here)
1153: |begin(figure)
1154: Like the lumberjack poem above,
1155: this text is within a |cw<|sp(|)figure>
1156: command.
1157: |end(figure)
1158: |figure_caption(This is a figure caption)
1159: |end(here)
1160:
1161: |p
1162: To create a non-filled display without spacing above and below, use the
1163: command |cw<|sp(|)verbatim>.
1164: To indent either a figure or a verbatim display,
1165: simply enclose it within an |cw<|sp(|)indent> command:
1166:
1167: |begin(cwfigure)
1168: |sp(|)begin(here)
1169: |sp(|)begin(indent)
1170: |sp(|)begin(figure)
1171: This is a short figure
1172: |sp(|)end(figure)
1173: |sp(|)end(indent)
1174: |sp(|)figure_caption(with a short caption)
1175: |sp(|)end(here)
1176: |end(cwfigure)
1177:
1178: The command |cw<|sp(|)indent> can appear either inside or around the
1179: |cw<|sp(|)figure> command.
1180: However, because the caption is centered, it should not be indented.
1181: |p
1182: The |cw<|sp(|)here> command keeps all the text within its delimiters
1183: together on one page.
1184: It is important to include both the figure proper and its caption within
1185: the delimiters so that the caption is never orphaned.
1186: If there is not enough room on the current page, |cw<|sp(|)here>
1187: leaves the rest of the
1188: page blank and skips to the next page or next column to print the block.
1189: It is useful after comments such as ``An example follows:'',
1190: because it guarantees the relative position of the comment and the block.
1191: |p
1192: Another command, |cw<|sp(|)around>, also keeps the enclosed text together.
1193: If it cannot print the block on the current page, however, it continues
1194: printing text, postponing the block until there is enough room for it.
1195: Usually the block will be positioned at the top of the next page;
1196: however, if there are multiple large floating blocks that cannot fit together
1197: on that page, then they will appear in order as soon as possible.
1198: You can use the command |cw<|sp(|)around_placement> to force all outstanding
1199: blocks to be printed at the end of a section or chapter.
1200:
1201: |subsection(Equations)
1202:
1203: |i<Monk> uses |i<eqn>|reference<latest eqn> to format equations.
1204: The |i<monk> command |cw<|sp(|)equation> delimits an equation offset from the text.
1205: Note that |i<monk> commands may appear within the line;
1206: they do not need to be at the beginning of a line.
1207:
1208: |begin(cwfigure)
1209: |sp(|)begin(center)
1210: |sp(|)equation_number[(1a)]
1211: |sp(|)begin(equation)x = 2 pi int
1212: sin ( omega t ) dt
1213: |sp(|)end(equation)
1214: |sp(|)end(center)
1215: |end(cwfigure)
1216:
1217: When formatted the above input produces:
1218:
1219: |begin(center)
1220: |equation_number[(1a)]
1221: |begin(equation)x = 2 pi int
1222: sin ( omega t ) dt
1223: |end(equation)
1224: |end(center)
1225: |blank_space(-1)
1226:
1227: The same output is produced by the short |i<monk> form:
1228: |cw<|sp(|)equation[x = 2 pi int sin ( omega t ) dt]>.
1229: Captions are specified using |cw<|sp(|)equation_caption>.
1230: |p
1231: The equation itself
1232: is explained on page 2 of the Kernighan and Cherry memo.|footnote{Remember
1233: that the |i<monk> command |cw<|sp(|)equation(...)> replaces all
1234: instances of |cw<.EQ> and |cw<.EN> and that |cw<|sp(|)e(...)> replaces the
1235: |cw<$...$> delimiters for in-line equations.}
1236: To write in-line equations,
1237: delimit the equation using |cw<|sp(|)e>.
1238: The input |cw{|sp(|)e<x = 2 pi int sin ( omega t ) dt>}
1239: produces the equation |e<x = 2 pi int sin ( omega t ) dt>
1240: without offsetting it.
1241:
1242: |subsection(Tables)
1243: |save(table_example)
1244:
1245: |i<Monk> does not provide any new capabilities for formatting tables;
1246: it uses |i(tbl)|reference(latest tbl).
1247: It provides |i<monk>-style commands for positioning both the table and its caption
1248: and automatically invokes the standard |i(tbl) formatting program.
1249: The following input formats the table in the file |i(examples/example.table),
1250: which appears as Appendix |remember(table_appendix).|footnote{The
1251: formatting commands |cw<.TS> and |cw<.TE>
1252: need to be omitted from the sample file.}
1253: The table could be typed into the file directly; here it is put into another
1254: file just to simplify and condense the |i<monk> example.
1255:
1256: |begin(cwfigure)
1257: |sp(|)begin(here)
1258: |sp(|)table_caption(Example of table)
1259: |sp(|)begin(table)
1260: |sp(|)insert(examples/example.table)
1261: |sp(|)end(table)
1262: |sp(|)end(here)
1263: |end(cwfigure)
1264:
1265: |p
1266: The command |cw<|sp(|)here> guarantees that the caption will not be separated
1267: from the table if it happens to hit a page boundary.
1268: The remainder of the page would be blank,
1269: and the table with caption would be printed on the next page
1270: or in the next column for multi-column documents.
1271: Together |i<monk> and |i<tbl> produce
1272:
1273: |begin(here)
1274: \!.sp -1
1275: |table_caption(Example of table)
1276: |begin(table)
1277: |insert(examples/example.table)
1278: |end(table)
1279: |end(here)
1280:
1281: |p
1282: If you have a 5620 or a 630MTG terminal,
1283: the interactive table editor |i<vtbl>
1284: can be used to prepare |i<tbl> input.|reference(Murrel bitmaps build tables)
1285: Both the table structure and its text contents can be edited using |i<vtbl>.
1286: |comment[
1287: |subsection(Computer Programs and Output)
1288: Two special types of figures are provided for computer-related text.
1289: The command |cw<|sp(|)program> beautifies the source code of C,
1290: a high-level programming language.
1291: It will try to beautify anything appearing within its delimiters following a simple
1292: set of rules that identify program segments.
1293: |begin(program)
1294: main()
1295: {
1296: printf("Hello World\n");
1297: }
1298: |end(program)
1299: Used inappropriately, it will produce good looking garbage.
1300: |cw<|sp(|)computeroutput_caption (Example of computer output)> and
1301: |cw<|sp(|)program_caption (Example of program)>
1302: provide the associated captions.]
1303:
1304: |subsection(Computer Output)
1305:
1306: The command |cw<|sp(|)computeroutput> produces a figure using a constant width
1307: type that resembles low quality line printer output.
1308:
1309: |begin(computeroutput)
1310: Program: SINDSCAL-symmetric indscal
1311:
1312: ***********************************
1313: parameters
1314: dim irdata itmax irn
1315: 2 2 200 9342
1316: no. of matrices=5 no. of stim.=9
1317: ***********************************
1318:
1319: correlations vaf loss
1320: y(data)&yhat (r**2) (y-yhat)**2
1321: .161169 .025975 .974025
1322: .650655 .423352 .605140
1323: |end(computeroutput)
1324: |blank_space(-2)
1325: |computeroutput_caption(Example of computer output)
1326:
1327: |cw<|sp(|)computeroutput_caption (Example of computer output)>
1328: provides the associated caption.
1329: Currently these captions are the same as figure captions.
1330:
1331: |subsection(Pictures)
1332: |save(picture_example)
1333:
1334: |i<Monk> commands also provide access to |i<pic>, a graphics language for
1335: typesetting.|reference[latest pic]
1336: Borrowing an example from the |i<PIC User Manual>,|footnote{Remember
1337: that the |i<monk> command |cw<|sp(|)picture(...)> replaces all
1338: instances of |cw<PS> and |cw<PE>.}
1339: the |i<monk> input
1340:
1341: |begin(cwfigure)
1342: |sp(|)begin(here)
1343: |sp(|)begin(picture)
1344: |sp(|)insert(examples/example.pic1)
1345: |sp(|)end(picture)
1346: |sp(|)picture_caption(Example of picture)
1347: |sp(|)end(here)
1348: |end(cwfigure)
1349:
1350: produces
1351:
1352: |begin(picture)
1353: |insert(examples/example.pic1)
1354: |end(picture)
1355: |picture_caption(Example of picture)
1356:
1357: |p
1358: If you have a 5620 or a 630MTG terminal,
1359: the interactive drawing program |i<cip>
1360: can be used to prepare |i<pic> input.|reference(latest cip)
1361: |p
1362: Another example from Kernighan's |i<PIC Revised User Manual> illustrates
1363: the use of an in-line equation embedded in a picture.|footnote{In
1364: this example, the equation within the delimiters must be placed within the
1365: |cw<|sp(|)e> command.}
1366:
1367: |comment<box "|sp(|s)e[space 0 {H( omega )} over {1 - H( omega )}]">
1368:
1369: |begin(cwfigure)
1370: |sp(|)begin(here)
1371: |sp(|)begin(picture)
1372: arrow
1373: box "|sp(|)e[{H( omega )} over {1 - H( omega )}]"
1374: arrow
1375: |sp(|)end(picture)
1376: |sp(|)picture_caption(Picture with equation)
1377: |sp(|)end(here)
1378: |end(cwfigure)
1379:
1380: produces the following beauty
1381:
1382: |begin(here)
1383: |begin(picture)
1384: arrow
1385: box "|e[{H( omega )} over {1 - H( omega )}]"
1386: arrow
1387: |end(picture)
1388: |picture_caption(Picture with equation)
1389: |end(here)
1390:
1391: |comment{
1392: |subsection(Strings)
1393: |cw<|sp(|)savestring> saves strings for you to use later.
1394: |savestring(os "The UNIX operating system")
1395: After the command |cw<|sp(|)savestring(os "The UNIX operating system")>,
1396: |cw<|sp(s)remember(os)> is replaced by |remember(os).
1397: They are especially useful when you want to repeatedly use some long name or
1398: phrase.
1399: }
1400:
1401: |subsection(Footnotes)
1402:
1403: A numbered footnote is generated by the command |cw[|sp(|)footnote] appended to
1404: the running text.|footnote(This is a numbered footnote)
1405: The text |cw<|sp(|)footnote(This is yet another numbered footnote)>
1406: produces
1407: numbered footnotes.|footnote(This is yet another numbered footnote)
1408: Analogously, |cw<|sp(|)dagnote> and |cw<|sp(|)starnote> produce
1409: daggered footnotes|dagnote(This is a daggered footnote)
1410: and starred footnotes.|starnote(This is a starred footnote)
1411: Footnote types can be mixed, as in this section.
1412:
1413: |subsection(Citations)
1414: |save(save_section)
1415:
1416: |i<Monk> uses the program |i<cite> to handle citations.
1417: The command |cw<|sp(|)save(tag)>
1418: remembers the last important numbered item as the label
1419: |i[tag].
1420: It saves the number of the last figure, picture, equation, table,
1421: section, subsection, subsubsection or appendix.
1422: At this point the command |cw<|sp(|)save(this_section)> stores
1423: the number of the current subsection as |cw(this_section).
1424: |save(this_section)
1425: The |i(monk) command |cw<|sp(|)remember(this_section)> is replaced by
1426: that stored value wherever it appears in the text:
1427: |cw[This section is |sp(|)remember(this_section)] appears in the
1428: final output as This section is |remember(this_section).
1429: It is crucial to understand that |cw[|sp(|)save] stores the most recent
1430: counter, whatever its type.
1431: If a numbered figure appears between the section header and the |cw[|sp(|)save]
1432: command, then the number saved will be that figure number.
1433: The tag name itself has no particular meaning.
1434: Position is what counts.
1435: |p
1436: Page numbers can be saved using the command |cw<|sp(|)savepage.>
1437: |cw<|sp(|)savepage(tag)> saves the current page number as
1438: the label |cw[tag].
1439: Again, |cw<|sp(|)remember(tag)> substitutes the number
1440: associated with |cw[tag].
1441: The text
1442: |cw<the current page is |sp(|)savepage(foobar) |sp(|)remember(foobar)>
1443: generates |cw<the current page is |savepage(foobar)|remember(foobar)>.
1444: |p
1445: If all citations are saved before they are used, then the user need
1446: only enter the commands shown above in the |i<monk> input text.
1447: If, however, the input uses a citation before it really is saved,
1448: as in the example below, then there is more to do.
1449:
1450: |begin(cwfigure)
1451: All commands are listed in appendix
1452: |sp(|)remember(appendix_commands).
1453: |sp(zero width space)|b(...)
1454: |sp(|)appendix(|s(LIST OF COMMANDS))
1455: |sp(|)save(appendix_commands)
1456: |end(cwfigure)
1457:
1458: Forward referencing depends on a file named |cw<.cite>,
1459: which is generated each time the input is formatted.
1460: The |small<UNIX> command
1461:
1462: |begin(figure)
1463: |cw(cite |sp(minus)s .cite > myfile.cite)
1464: |end(figure)
1465:
1466: reports any redefinitions or unused definitions and produces a consistent
1467: set of citations.
1468: The output file |cw<myfile.cite> needs to be inserted in the |i<monk> input
1469: before the first citation.
1470: Do so using the command |cw<|sp(|)insert(myfile.cite)>.
1471:
1472: |comment[
1473: |subsection(Creating an Index)
1474: You can specify keywords to be inserted in an index using |cw(|sp(|)index):
1475: |cw<|sp(|)index(these words)>.
1476: The keywords |i<these words> will appear in the index with the current page
1477: number.]
1478: ........
1479:
1480: |subsection(References)
1481:
1482: |i<Monk> uses |i<prefer> to extract references from a
1483: bibliographic database.|reference<Derr Prefer>
1484: To use |i<prefer> capabilities with |i<monk>,
1485: there are only two additional things you need to know.
1486: First, the |cw<|sp(|)reference> command passes a partial reference to
1487: |i<prefer>, as in:
1488: |cw<|sp(|)|sp(zero width space)reference( Derr Prefer)>.
1489: When this command is used, |i<monk> will automatically invoke |i<prefer>.
1490: Second, the |cw<|sp(minus)R> option to |i<monk> serves to specify
1491: a local or private bibliography file:
1492:
1493: |begin(cwfigure)
1494: monk |sp(minus)Sproof |sp(minus)R bibliofile myfile
1495: |end(cwfigure)
1496:
1497: |section(Advanced Monk)
1498:
1499: |subsection(Preparing a large document)
1500:
1501: When working on large documents,
1502: it is important to be able to run off parts of the document separately,
1503: while maintaining correct numbering and references to other parts of the document.
1504: You can do this with |i<monk> by dividing the document into several files
1505: and identifying each file appropriately.
1506: |p
1507: The top-level file should contain all style information
1508: and include the various segments.
1509: For a book with three chapters, the parent file |cw<myfile> might look like:
1510:
1511: |begin(cwfigure)
1512: |sp(|)make(kluwer)
1513: |sp(|)style(page_width 7i)
1514: |sp(|)insert(chapter1)
1515: |sp(|)insert(chapter2)
1516: |sp(|)insert(chapter3)
1517: |end(cwfigure)
1518:
1519: The first line of each chapter file should identify it as a part
1520: of |cw<myfile>: |cw<|sp(|)part(myfile)>.
1521: |p
1522: When you run off the entire document, |i<monk> will remember the assorted
1523: section, display, and page numbers.
1524:
1525: |comment{as well as information you save using
1526: |cw<|sp(|)save> or |cw<|sp(|)savepage>.}
1527:
1528: These numbers will then be used when you run off individual parts.
1529: Note that the numbers should always be reasonable approximations, but may
1530: not always be correct.
1531: When several sections are changing simultaneously, you will need to
1532: generate the entire document periodically to guarantee that all numbers
1533: are exact.
1534:
1535: |comment{
1536: |subsection(Table of contents)
1537: To run off a table of contents with your document,
1538: use the |cw(|sp(minus)ZZZ) option.
1539: To run off only a table of contents, ZZZ.
1540: By default, this will produce ZZZ.
1541: |p
1542: You have the following options: ZZZ.}
1543:
1544: |comment{
1545: |section(Error messages)
1546: The following are the error messages currently given by monk:
1547: |begin(figure)
1548: |begin(cw)
1549: usage: monk [-d database_dir -n ] filename; no option g
1550: fiugre is not a monk command: use ``|sp(|)sp(|sp(|))'' to put `|sp(|)' in text
1551: Expecting end for figure begun at line 112; got end for table
1552: No end for figure begun at line 112
1553: Unexpected end for figure
1554: Mismatched delimiters around figure; expecting >, got EOF
1555: Mismatched delimiters around figure; expecting >, got ]
1556: |end(cw)
1557: |end(figure)}
1558: ......
1559:
1560: |subsection(Modifying the standard formats)
1561:
1562: You can redefine existing |i<monk> commands,
1563: such as |cw<|sp(|)ret_address> and |cw<|sp(|)p>,
1564: and you can create new document types using the standard
1565: |i<monk> database language.
1566: An early description of the database language is available,|reference{monk
1567: database}
1568: but there is no up-to-date guide.
1569: When the dust has settled,
1570: a new manual will be written.
1571: Currently, any augmentations you write should be considered temporary.
1572:
1573: |comment{
1574: When you change an existing |i<monk> command, the message
1575: ``|cw<file line_number: Redefining definition_name>''
1576: will be printed, where |i<file> and |i<line_number> identify where the
1577: redefinition of |i<definition_name> was encountered.
1578: A definition can appear anywhere in user text, but must precede its first usage.
1579: We recommend maintaining separate files of definitions, rather than including
1580: them in-line with your text.
1581: The definition file can be typed on your command line,
1582: |cw<monk definition_file text_file>, or
1583: included in your text file after the |cw<|sp(|)make> command,
1584: |cw<|sp(|)insert(definition_file)>.
1585: If you change a definition in the middle of a document,
1586: all instances before the redefinition will use the original,
1587: all later instances the new.
1588: |p
1589: Certain words are reserved as internal database commands and
1590: cannot be redefined:
1591: |cw<associate>, |cw<attribute>, |cw<begin>, |cw<comment>, |cw<define>, |cw<end>,
1592: |cw<environment>, |cw<for>, |cw<if>, |cw<else>, |cw<ifvalue>, |cw<insert>,
1593: F|cw<macro>, |cw<part>, and |cw<source>.}
1594:
1595: |p
1596: You can also cheat by adding commands in the underlying
1597: formatting language;|reference<troff latest reference>|reference<troff tutorial latest>
1598: this method may offer quick fixes,
1599: but there is a possibility of conflict with the |i<monk> program.
1600: |i<Monk> expends considerable effort managing the state of
1601: various attributes such as fonts and indentation level.
1602: Therefore, if you change things without |i<monk>'s knowledge
1603: by using |i<troff> directly,
1604: |i<monk> may well undo your changes
1605: in the normal course of processing its own input commands.
1606:
1607: |subsection(Other related programs)
1608:
1609: There are three other programs useful to |i(monk) users:
1610: |i(demonk) is the moral equivalent of |i(deroff),
1611: |i(monkmerge) is the functional equivalent of |i(soelim),
1612: and |i(monkspell) is the |i(spell) preprocessor.
1613: These tools are helpful when processing |i(monk) files using other
1614: programs, such as indexing tools.
1615:
1616: |reference_placement
1617:
1618: |new_page
1619: .ad l
1620: |appendix(List of Commands)
1621:
1622: |comment<changed spacing above standard section in the body to match
1623: mpm. penalty small because there are not a lot of sections.
1624: changing here in the appendices changed the page count.... >
1625:
1626: |environment(section;
1627: divert.string Ts;
1628:
1629: minimum.lines 2v, protect, incr S0,
1630: clear S1 S2 S3,
1631: font bold,
1632: |ifvalue sectioning bychapter [
1633: number CH, text ".",
1634: ]
1635: |ifvalue sectioning byappendix [
1636: number AC, text ".",
1637: ]
1638: number S0,
1639: |ifvalue sectioning bysection [
1640: text ".",
1641: ]
1642: text " ", string Ts, font roman,
1643: paragraph,
1644: clear string Rs,
1645: |ifvalue sectioning bychapter [
1646: store string.from.number Rs CH,
1647: add string Rs ".",
1648: ]
1649: |ifvalue sectioning byappendix [
1650: store string.from.number Rs AC,
1651: add string Rs ".",
1652: ]
1653: add string.from.number Rs S0,
1654: |ifvalue sectioning bysection [
1655: contents section 1 Rs Ts,
1656: ]
1657: |ifvalue sectioning bychapter [
1658: contents section 2 Rs Ts,
1659: ]
1660: |ifvalue sectioning byappendix [
1661: contents section 2 Rs Ts,
1662: ])
1663: |comment<summary: section (numbered section; IT)>
1664:
1665: |section(Global Commands)
1666:
1667: |insert(commands/global)
1668:
1669: |section(Letters)
1670:
1671: |insert(commands/letter)
1672:
1673: |section(Memoranda)
1674:
1675: |insert(commands/memo)
1676:
1677: |section(Merit Review Form 1)
1678:
1679: |insert(commands/form1)
1680:
1681: |section(Bi-Annual Research Reports)
1682:
1683: |insert(commands/research)
1684:
1685: |section(Center Phone Books)
1686:
1687: |insert(commands/centerpb)
1688:
1689: |section(Technical Memoranda)
1690:
1691: |insert(commands/tm)
1692:
1693: |section(Internal Memoranda)
1694:
1695: |insert(commands/im)
1696:
1697: |section(Technical Correspondence)
1698:
1699: |insert(commands/tc)
1700:
1701: |section(Release Papers)
1702:
1703: |insert(commands/rp)
1704:
1705: |section(Association for Computing Machinery Proceedings)
1706:
1707: |insert(commands/acm)
1708:
1709: |section(Conference Proceedings Model Sheets)
1710:
1711: |insert(commands/model)
1712:
1713: |section(Computer Science Press Books)
1714:
1715: |insert(commands/cspress)
1716:
1717: |section(Kluwer Academic Publishers Books)
1718:
1719: |insert(commands/kluwer)
1720:
1721: |section(Nursing Home Song Sheets)
1722:
1723: |insert(commands/song)
1724:
1725: .ad b
1726:
1727: |appendix(List of Special Characters)
1728: |save(special_appendix)
1729:
1730: The special characters that control spacing and carriage movements are
1731: described in section |remember(special_section).
1732: All other special characters are listed below.
1733: For each character,
1734: column |cw<Char> contains the final printed character
1735: and column |cw<Name> contains the keywords
1736: given to |i<monk> to specify the character.
1737: To print the character |sp(rhand), type |cw<|sp(|)sp(rhand)>
1738: in your input file.
1739:
1740: |insert(examples/special)
1741:
1742: |appendix(List Of Examples)
1743:
1744: This appendix provides the input text for examples that appear in
1745: this |i<Monk> user guide.
1746: They are not intended for a novice user,
1747: but for those already familiar with these formatting tools.
1748: If you want to learn how to use |i<tbl> or |i<pic>
1749: do not look at these examples.
1750: Please read the guides that are listed in the references.
1751: These guides, which are readily available,
1752: begin with simple examples.
1753:
1754: |comment<|section(Table in section |remember(table_example))>
1755: |section(Table in section 5.14)
1756: |save(table_appendix)
1757: .ta 1.4i 2.6i
1758:
1759: |begin(figure)
1760: |source(examples/example.table)
1761: |end(figure)
1762:
1763: .ta
1764:
1765: |comment<|section(Picture in section |remember(picture_example))>
1766: |section(Picture in section 5.16)
1767:
1768: .ta .2i
1769:
1770: |begin(figure)
1771: |source(examples/example.pic1)
1772: |end(figure)
1773:
1774: .ta
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.