document distributed with 4.2BSD
[unix-history] / usr / src / share / doc / usd / 18.msdiffs / ms.diffs
CommitLineData
c44c8f55
KM
1.\" Copyright (c) 1983 Regents of the University of California.
2.\" All rights reserved. The Berkeley software License Agreement
3.\" specifies the terms and conditions for redistribution.
4.\"
5.\" @(#)ms.diffs 5.1 (Berkeley) %G%
6.\"
7.nr LL 6.5i
8.nr FL 6.0i
9.if t .nr PD .5v
10.if t .ds m \u\(ul\dm
11.if n .ds m -m
12.AM
13.OH '\fIThe New -ms Macros\fR''\fIPage %\fR'
14.EH '\fIPage %\fR''\fIThe New -ms Macros\fR'
15.TL
16A Revised Version of \*ms
17.AU
18Bill Tuthill
19.AI
20Computing Services
21University of California
22Berkeley, CA 94720
23.PP
24The \*ms macros have been slightly revised and re\%arranged.
25Because of the rearrangement,
26the new macros can be read by the computer
27in about half the time required by the previous version of \*ms.
28This means that output will begin to appear between ten seconds
29and several minutes more quickly, depending on the system load.
30On long files, however, the savings in total time are not substantial.
31The old version of \*ms is still available as \*mos.
32.PP
33Several bugs in \*ms have been fixed, including
34a bad problem with the .1C macro,
35minor difficulties with boxed text,
36a break induced by .EQ before initialization,
37the failure to set tab stops in displays,
38and several bothersome errors in the \fBrefer\fP macros.
39Macros used only at Bell Laboratories have been removed.
40There are a few extensions to previous \*ms macros,
41and a number of new macros, but all the documented \*ms macros
42still work exactly as they did before, and have the same names as before.
43Output produced with \*ms should look like output produced with \*mos.
44.PP
45One important new feature is automatically numbered footnotes.
46Footnote numbers are printed by means of a pre-defined string
47(\e\(**\(**), which you invoke separately from .FS and .FE.
48Each time it is used, this string increases the footnote number by one,
49whether or not you use .FS and .FE in your text.
50Footnote numbers will be superscripted on the phototypesetter
51and on daisy-wheel terminals, but on low-resolution devices
52(such as the lpr and a crt), they will be bracketed.
53If you use \e\(**\(** to indicate numbered footnotes,
54then the .FS macro will automatically include
55the footnote number at the bottom of the page.
56This footnote, for example, was produced as follows:\**
57.DS
58This footnote, for example, was produced as follows:\e\(**\(**
59\&.FS
60.sp -.2
61 ...
62\&.FE
63.DE
64.FS
65If you never use the ``\e\(**\(**'' string,
66no footnote numbers will appear anywhere in the text,
67including down here.
68The output footnotes will look exactly like
69footnotes produced with \*mos.
70.FE
71If you are using \e\(**\(** to number footnotes,
72but want a particular footnote to be marked with an asterisk or a dagger,
73then give that mark as the first argument to .FS: \(dg
74.DS
75then give that mark as the first argument to .FS: \e(dg
76\&.FS \e(dg
77.sp -.2
78 ...
79\&.FE
80.DE
81.FS \(dg
82In the footnote, the dagger will appear where the footnote
83number would otherwise appear, as on the left.
84.FE
85Footnote numbering will be temporarily suspended,
86because the \e\(**\(** string is not used.
87Instead of a dagger, you could use an asterisk *
88or double dagger \(dd, represented as \|\e(dd.
89.PP
90Another new feature is a macro for printing theses
91according to Berkeley standards.
92This macro is called .TM, which stands for thesis mode.
93(It is much like the .th macro in \*me.)
94It will put page numbers in the upper right-hand corner;
95number the first page; suppress the date;
96and doublespace everything except quotes, displays, and keeps.
97Use it at the top of each file making up your thesis.
98Calling .TM defines the .CT macro for chapter titles,
99which skips to a new page and moves the pagenumber to the center footer.
100The .P1 (P one) macro can be used even without thesis mode
101to print the header on page 1,
102which is suppressed except in thesis mode.
103If you want roman numeral page numbering,
104use an ``.af\0PN\0i'' request.
105.PP
106There is a new macro especially for bibliography entries,
107called .XP, which stands for exdented paragraph.
108It will exdent the first line of the paragraph by \en(PI units,
109usually 5n (the same as the indent for the first line of a .PP).
110Most bibliographies are printed this way.
111Here are some examples of exdented paragraphs:
112.XP
113Lumley, Lyle S., \fISex in Crustaceans: Shell Fish Habits,\fP\|
114Harbinger Press, Tampa Bay and San Diego, October 1979.
115243 pages.
116The pioneering work in this field.
117.XP
118Leffadinger, Harry A., ``Mollusk Mating Season: 52 Weeks, or All Year?''
119in \fIActa Biologica,\fP\| vol. 42, no. 11, November 1980.
120A provocative thesis, but the conclusions are wrong.
121.LP
122Of course, you will have to take care of
123italicizing the book title and journal,
124and quoting the title of the journal article.
125Indentation or exdentation can be changed
126by setting the value of number register PI.
127.PP
128If you need to produce endnotes rather than footnotes,
129put the references in a file of their own.
130This is similar to what you would do if you were
131typing the paper on a conventional typewriter.
132Note that you can use automatic footnote numbering
133without actually having .FS and .FE pairs in your text.
134If you place footnotes in a separate file,
135you can use .IP macros with \e\(**\(**\| as a hanging tag;
136this will give you numbers at the left-hand margin.
137With some styles of endnotes,
138you would want to use .PP rather then .IP macros,
139and specify \e\(**\(** before the reference begins.
140.PP
141There are four new macros to help produce a table of contents.
142Table of contents entries must be enclosed in .XS and .XE pairs,
143with optional .XA macros for additional entries;
144arguments to .XS and .XA specify the page number,
145to be printed at the right.
146A final .PX macro prints out the table of contents.
147Here is a sample of typical input and output text:
148.DS
149\&.XS ii
150Introduction
151\&.XA 1
152Chapter 1: Review of the Literature
153\&.XA 23
154Chapter 2: Experimental Evidence
155\&.XE
156\&.PX
157.sp .5
158.lt 5.5i
159.tl ''\fBTable of Contents\fP''
160.ta 5i 5.5iR
161.sp
162Introduction \ 1 ii\|
163Chapter 1: Review of the Literature \ 1 1
164Chapter 2: Experimental Evidence \ 1 23
165.sp .5
166.DE
167The .XS and .XE pairs may also be used in the text,
168after a section header for instance,
169in which case page numbers are supplied automatically.
170However, most documents that require a table of contents
171are too long to produce in one run,
172which is necessary if this method is to work.
173It is recommended that you do a table of contents
174after finishing your document.
175To print out the table of contents, use the .PX macro;
176if you forget it, nothing will happen.
177.PP
178As an aid in producing text that will format correctly
179with both \fBnroff\fP and \fBtroff\fP,
180there are some new string definitions that define quotation marks
181and dashes for each of these two formatting programs.
182The \e\(**\^\u_\d string will yield two hyphens in \fBnroff\fP,
183but in \fBtroff\fP it will produce an em dash\*-
184like this one.
185The \e\(**Q and \e\(**U strings will produce
186`` and '' in \fBtroff\fP, but " in \fBnroff\fP.
187(In typesetting, the double quote is traditionally considered bad form.)
188.PP
189There are now a large number of optional
190foreign accent marks defined by the \*ms macros.
191All the accent marks available in \*mos are present,
192and they all work just as they always did.
193However, there are better definitions available
194by placing .AM at the beginning of your document.
195Unlike the \*mos accent marks,
196the accent strings should come \fIafter\fP\| the letter being accented.
197Here is a list of the diacritical marks,
198with examples of what they look like.
199.DS
200.ta 2i 3i
201name of accent input output
202\l'3.5i'
203acute accent e\e\(**\' e\*'
204grave accent e\e\(**\` e\*`
205circumflex o\e\(**\d^\u o\*^
206cedilla c\e\(**, c\*,
207tilde n\e\(**\d~\u n\*~
208question \e\(**? \*?
209exclamation \e\(**! \*!
210umlaut u\e\(**: u\*:
211digraph s \e\(**8 \*8
212hac\*vek c\e\(**v c\*v
213macron a\e\(**_ a\*_
214underdot s\e\(**. s\*.
215o-slash o\e\(**/ o\*/
216angstrom a\e\(**o a\*o
217yogh kni\e\(**3t kni\*3t
218Thorn \e\(**(Th \*(Th
219thorn \e\(**(th \*(th
220Eth \e\(**(D- \*(D-
221eth \e\(**(d- \*(d-
222hooked o \e\(**q \*q
223ae ligature \e\(**(ae \*(ae
224AE ligature \e\(**(Ae \*(Ae
225oe ligature \e\(**(oe \*(oe
226OE ligature \e\(**(Oe \*(Oe
227.DE
228If you want to use these new diacritical marks,
229don't forget the .AM at the top of your file.
230Without it, some will not print at all,
231and others will be placed on the wrong letter.
232.PP
233It is also possible to produce custom headers and footers
234that are different on even and odd pages.
235The .OH and .EH macros define odd and even headers,
236while .OF and .EF define odd and even footers.
237Arguments to these four macros are specified as with .tl.
238This document was produced with:
239.DS
240\&.OH \'\ef\^IThe -mx Macros\'\'Page %\ef\^P\'
241\&.EH \'\ef\^IPage %\'\'The -mx Macros\ef\^P\'
242.DE
243Note that it would be a error to have an apostrophe in the header text;
244if you need one, you will have to use a different delimiter
245around the left, center, and right portions of the title.
246You can use any character as a delimiter, provided it doesn't appear
247elsewhere in the argument to .OH, .EH, .OF, or EF.
248.PP
249The \*ms macros work in conjunction with
250the \fBtbl\fR, \fBeqn\fR, and \fBrefer\fR preprocessors.
251Macros to deal with these items are read in only as needed,
252as are the thesis macros (.TM),
253the special accent mark definitions (.AM),
254table of contents macros (.XS and .XE),
255and macros to format the optional cover page.
256The code for the \*ms package lives in /usr/lib/tmac/tmac.s,
257and sourced files reside in the directory /usr/ucb/lib/ms.
258.sp
259.tl '''\*(DY'