Merge branch 'master' of git://github.com/illumos/illumos-gate
[unleashed.git] / usr / src / man / man5 / ms.5
blob8a2c6716d67c8ff7214c172601b60421238c44be
1 '\" te
2 .\" Copyright (c) 1992, Sun Microsystems, Inc.
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH MS 5 "Feb 25, 1992"
7 .SH NAME
8 ms \- text formatting macros
9 .SH SYNOPSIS
10 .LP
11 .nf
12 \fBnroff\fR  \fB-ms\fR [\fIoptions\fR] \fIfilename\fR...
13 .fi
15 .LP
16 .nf
17 \fBtroff\fR  \fB-ms\fR [\fIoptions\fR] \fIfilename\fR...
18 .fi
20 .SH DESCRIPTION
21 .sp
22 .LP
23 This package of \fBnroff\fR(1) and \fBtroff\fR(1) macro definitions provides a
24 formatting facility for various styles of articles, theses, and books. When
25 producing 2-column output on a terminal or lineprinter, or when reverse line
26 motions are needed, filter the output through \fBcol\fR(1). All external
27 \fB-ms\fR macros are defined below.
28 .sp
29 .LP
30 Note: this  \fB-ms\fR macro package is an extended version written at Berkeley
31 and is a superset of the standard  \fB-ms\fR macro packages as supplied by Bell
32 Labs.  Some of the Bell Labs macros have been removed; for instance, it is
33 assumed that the user has little interest in producing headers stating that the
34 memo was generated at Whippany Labs.
35 .sp
36 .LP
37 Many \fBnroff\fR and \fBtroff\fR requests are unsafe in conjunction with this
38 package. However, the first four requests below may be used with impunity after
39 initialization, and the last two may be used even before initialization:
40 .sp
41 .ne 2
42 .na
43 \fB\fB\&.bp\fR\fR
44 .ad
45 .RS 11n
46 begin new page
47 .RE
49 .sp
50 .ne 2
51 .na
52 \fB\fB\&.br\fR\fR
53 .ad
54 .RS 11n
55 break output line
56 .RE
58 .sp
59 .ne 2
60 .na
61 \fB\fB\&.sp\fR\fI n\fR\fR
62 .ad
63 .RS 11n
64 insert n spacing lines
65 .RE
67 .sp
68 .ne 2
69 .na
70 \fB\fB\&.ce\fR\fI n\fR\fR
71 .ad
72 .RS 11n
73 center next n lines
74 .RE
76 .sp
77 .ne 2
78 .na
79 \fB\fB\&.ls\fR\fI n\fR\fR
80 .ad
81 .RS 11n
82 line spacing: \fIn\fR\fB=1\fR single, \fIn\fR\fB=2\fR double space
83 .RE
85 .sp
86 .ne 2
87 .na
88 \fB\fB\&.na\fR\fR
89 .ad
90 .RS 11n
91 no alignment of right margin
92 .RE
94 .sp
95 .LP
96 Font and point size changes with \fB\ef\fR and \fB\es\fR are also allowed; for
97 example, \fB\efIword\efR\fR will italicize \fIword\fR. Output of the
98 \fBtbl\fR(1), \fBeqn\fR(1) and \fBrefer\fR(1) preprocessors for equations,
99 tables, and references is acceptable as input.
100 .SH REQUESTS
105 c | c | c | c
106 l | l | l | l .
107 Macro Name      Initial Value   Break? Reset?   Explanation
109 \fB\&.AB\fR \fIx\fR     -       y       T{
110 begin abstract; if \fIx\fR=no do not label abstract
113 \fB\&.AE\fR     -       y       end abstract
115 \fB\&.AI\fR     -       y       author's institution
117 \fB\&.AM\fR     -       n       better accent mark definitions
119 \fB\&.AU\fR     -       y       author's name
121 \fB\&.B\fR \fIx\fR      -       n       embolden \fIx\fR; if no \fIx\fR, switch to boldface
123 \fB\&.B1\fR     -       y       begin text to be enclosed in a box
125 \fB\&.B2\fR     -       y       end boxed text and print it
127 \fB\&.BT\fR     date    n       bottom title, printed at foot of page
129 \fB\&.BX\fR \fIx\fR     -       n       print word \fIx\fR in a box
131 \fB\&.CM\fR     if t    n       cut mark between pages
133 \fB\&.CT\fR     -       y,y     T{
134 chapter title: page number moved to CF (TM only)
137 \fB\&.DA\fR \fIx\fR     if n    n       T{
138 force date \fIx\fR at bottom of page; today if no \fIx\fR
141 \fB\&.DE\fR     -       y       end display (unfilled text) of any kind
143 \fB\&.DS\fR \fIx y\fR   I       y       T{
144 begin display with keep; \fIx\fR=I,\|L,\|C,\|B; \fIy\fR=indent
147 \fB\&.ID\fR\fI y\fR     8n,.5i  y       indented display with no keep; \fIy\fR=indent
149 \fB\&.LD\fR     -       y       left display with no keep
151 \fB\&.CD\fR     -       y       centered display with no keep
153 \fB\&.BD\fR     -       y       block display; center entire block
155 \fB\&.EF\fR \fIx\fR     -       n       even page footer \fIx\fR (3 part as for \fB\&.tl\fR)
157 \fB\&.EH\fR \fIx\fR     -       n       even page header \fIx\fR (3 part as for \fB\&.tl\fR)
159 \fB\&.EN\fR     -       y       end displayed equation produced by \fBeqn\fR
161 \fB\&.EQ\fR \fIx y\fR   -       y       T{
162 break out equation; \fIx\fR=L,I,C; \fIy\fR=equation number
165 \fB\&.FE\fR     -       n       T{
166 end footnote to be placed at bottom of page
169 \fB\&.FP\fR     -       n       T{
170 numbered footnote paragraph; may be redefined
173 \fB\&.FS\fR \fIx\fR     -       n       T{
174 start footnote; \fIx\fR is optional footnote label
177 \fB\&.HD\fR     undef   n       optional page header below header margin
179 \fB\&.I\fR \fIx\fR      -       n       italicize \fIx\fR; if no \fIx\fR, switch to italics
181 \fB\&.IP\fR \fIx y\fR   -       y,y     T{
182 indented paragraph, with hanging tag \fIx\fR; \fIy\fR=indent
185 \fB\&.IX\fR \fIx y\fR   -       y       T{
186 index words \fIx\fR \fIy\fR and so on (up to 5 levels)
189 \fB\&.KE\fR     -       n       end keep of any kind
191 \fB\&.KF\fR     -       n       T{
192 begin floating keep; text fills remainder of page
195 \fB\&.KS\fR     -       y       T{
196 begin keep; unit kept together on a single page
199 \fB\&.LG\fR     -       n       larger; increase point size by 2
201 \fB\&.LP\fR     -       y,y     left (block) paragraph.
203 \fB\&.MC\fR \fIx\fR     -       y,y     multiple columns; \fIx\fR=column width
205 \fB\&.ND\fR \fIx\fR     if t    n       T{
206 no date in page footer; \fIx\fR is date on cover
209 \fB\&.NH\fR \fIx y\fR   -       y,y     T{
210 numbered header; \fIx\fR=level, \fIx\fR=0 resets, \fIx\fR=S sets to \fIy\fR
213 \fB\&.NL\fR     10p     n       set point size back to normal
215 \fB\&.OF\fR \fIx\fR     -       n       odd page footer \fIx\fR (3 part as for \fB\&.tl\fR)
217 \fB\&.OH\fR \fIx\fR     -       n       odd page header \fIx\fR (3 part as for \fB\&.tl\fR)
219 \fB\&.P1\fR     if TM   n       print header on first page
221 \fB\&.PP\fR     -       y,y     paragraph with first line indented
223 \fB\&.PT\fR     - % -   n       page title, printed at head of page
225 \fB\&.PX\fR \fIx\fR     -       y       T{
226 print index (table of contents); \fIx\fR=no suppresses title
229 \fB\&.QP\fR     -       y,y     quote paragraph (indented and shorter)
231 \fB\&.R\fR      on      n       return to Roman font
233 \fB\&.RE\fR     5n      y,y     T{
234 retreat: end level of relative indentation
237 \fB\&.RP\fR \fIx\fR     -       n       T{
238 released paper format; \fIx\fR=no stops title on first page
241 \fB\&.RS\fR     5n      y,y     T{
242 right shift: start level of relative indentation
245 \fB\&.SH\fR     -       y,y     section header, in boldface
247 \fB\&.SM\fR     -       n       smaller; decrease point size by 2
249 \fB\&.TA\fR     8n,5n   n       T{
250 set TAB characters to 8n 16n .\|.\|. (\fBnroff\fR)  or 5n 10n .\|.\|. (\fBtroff\fR)
253 \fB\&.TC\fR \fIx\fR     -       y       T{
254 print table of contents at end; \fIx\fR=no suppresses title
258 \fB\&.TH\fR - Y "multi-page end, header"
260 \fB\&.TL\fR     -       y       title in boldface and two points larger
262 \fB\&.TM\fR     off     n       UC Berkeley thesis mode
264 \fB\&.TE\fR     -       y       end of table processed by \fBtbl\fR
265 \fB\&.TS\fR \fIx\fR     -       y,y     T{
266 begin table; if \fIx\fR=H table has multi-page header
269 \fB\&.UL\fR \fIx\fR     -       n       underline \fIx\fR, even in \fBtroff\fR
271 \fB\&.UX\fR \fIx\fR     -       n       T{
272 UNIX; trademark message first time; \fIx\fR appended
275 \fB\&.XA\fR \fIx y\fR   -       y       T{
276 another index entry; \fIx\fR=page or no for none;  y=indent
279 \fB\&.XE\fR     -       y       T{
280 end index entry (or series of \fB\&.IX\fR entries)
283 \fB\&.XP\fR     -       y,y     T{
284 paragraph with first line indented, others indented
287 \fB\&.XS\fR \fIx y\fR   -       y       T{
288 begin index entry; \fIx\fR=page or no for none; \fIy\fR=indent
291 \fB\&.1C\fR     on      y,y     one column format, on a new page
293 \fB\&.2C\fR     -       y,y     begin two column format
295 \fB\&.]\|-\fR   -       n       beginning of \fBrefer\fR reference
297 \fB\&.[\|0\fR   -       n       end of unclassifiable type of reference
299 \fB\&.[\|N\fR   -       n       T{
300 N= 1:journal-article, 2:book, 3:book-article, 4:report
304 .SH REGISTERS
307 Formatting distances can be controlled in \fB-ms\fR by means of built-in number
308 registers. For example, this sets the line length to 6.5 inches:
310 .in +2
312 \&.nr  LL  6.5i
314 .in -2
318 Here is a table of number registers and their default values:
323 c | c | c | c
324 l | l | l | l .
325 Name    Register Controls       Takes Effect    Default
327 \fBPS\fR        point size              paragraph       10
329 \fBVS\fR        vertical spacing        paragraph       12
331 \fBLL\fR        line length             paragraph       6i
333 \fBLT\fR        title length            next page       same as \fBLL\fR
335 \fBFL\fR        footnote length         next \fB\&.FS\fR        5.5i
337 \fBPD\fR        paragraph distance      paragraph       1v (if n), .3v (if t)
339 \fBDD\fR        display distance        displays        1v (if n), .5v (if t)
341 \fBPI\fR        paragraph indent        paragraph       5n
343 \fBQI\fR        quote indent            next \fB\&.QP\fR        5n
345 \fBFI\fR        footnote indent         next \fB\&.FS\fR        2n
347 \fBPO\fR        page offset             next page       0 (if n), \(ap1i (if t)
349 \fBHM\fR        header margin           next page       1i
351 \fBFM\fR        footer margin           next page       1i
353 \fBFF\fR        footnote format         next \fB\&.FS\fR        0 (1, 2, 3 available)
358 When resetting these values, make sure to specify the appropriate units.
359 Setting the line length to 7, for example, will result in output with one
360 character per line. Setting \fBFF\fR to 1 suppresses footnote superscripting;
361 setting it to 2 also suppresses indentation of the first line; and setting it
362 to 3 produces an \fB\&.IP\fR-like footnote paragraph.
365 Here is a list of string registers available in \fB-ms\fR; they may be used
366 anywhere in the text:
371 c | c
372 l | l .
373 Name    String's Function
375 \fB\e*Q\fR      quote (\fB"\fR in \fBnroff,\fR\| \fB"\fR in \fBtroff\fR )
377 \fB\e*U\fR      unquote (\fB"\fR in \fBnroff,\fR\| \fB"\fR in \fBtroff\fR )
379 \fB\e*-\fR      dash (\fB--\fR in \fBnroff,\fR \fB\(em\fR in \fBtroff\fR )
381 \fB\e*(MO\fR    month (month of the year)
383 \fB\e*(DY\fR    day (current date)
385 \fB\e**\fR      automatically numbered footnote
387 \fB\e*'\fR      acute accent (before letter)
389 \fB\e*`\fR      grave accent (before letter)
391 \fB\e*^\fR      circumflex (before letter)
393 \fB\e*,\fR      cedilla (before letter)
395 \fB\e*:\fR      umlaut (before letter)
397 \fB\e*~\fR      tilde (before letter)
402 When using the extended accent mark definitions available with \fB\&.AM\fR,
403 these strings should come after, rather than before, the letter to be accented.
404 .SH FILES
406 .ne 2
408 \fB\fB/usr/share/lib/tmac/s\fR\fR
410 .RS 30n
415 .ne 2
417 \fB\fB/usr/share/lib/tmac/ms.???\fR\fR
419 .RS 30n
423 .SH SEE ALSO
426 \fBcol\fR(1), \fBeqn\fR(1), \fBnroff\fR(1), \fBrefer\fR(1), \fBtbl\fR(1),
427 \fBtroff\fR(1)
428 .SH BUGS
431 Floating keeps and regular keeps are diverted to the same space, so they cannot
432 be mixed together with predictable results.