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