Merge branch 'vendor/BZIP'
[dragonfly.git] / contrib / groff / tmac / groff_ms.man
1 '\" t
2 .ig
3 Copyright (C) 1989-1995, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009
4   Free Software Foundation, Inc.
5
6 Permission is granted to make and distribute verbatim copies of
7 this manual provided the copyright notice and this permission notice
8 are preserved on all copies.
9
10 Permission is granted to copy and distribute modified versions of this
11 manual under the conditions for verbatim copying, provided that the
12 entire resulting derived work is distributed under the terms of a
13 permission notice identical to this one.
14
15 Permission is granted to copy and distribute translations of this
16 manual into another language, under the above conditions for modified
17 versions, except that this permission notice may be included in
18 translations approved by the Free Software Foundation instead of in
19 the original English.
20 ..
21 .
22 .do nr groff_ms_C \n[.C]
23 .cp 0
24 .
25 .TH GROFF_MS @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@"
26 .
27 .
28 .
29 .SH NAME
30 .
31 groff_ms \- groff ms macros
32 .
33 .
34 .
35 .SH SYNOPSIS
36 .
37 .B groff
38 .B \-ms
39 [
40 .IR options .\|.\|.\&
41 ]
42 [
43 .IR files .\|.\|.\&
44 ]
45 .br
46 .B groff
47 .B \-m\ ms
48 [
49 .IR options .\|.\|.\&
50 ]
51 [
52 .IR files .\|.\|.\&
53 ]
54 .
55 .
56 .
57 .SH DESCRIPTION
58 .
59 This manual page describes the GNU version of the
60 .I ms
61 macros,
62 part of the
63 .I groff
64 typesetting system.
65 The
66 .I ms
67 macros are mostly compatible with the
68 documented behavior of the 4.3
69 .SM BSD
70 Unix
71 .I ms
72 macros (see
73 .I Differences from troff ms
74 below for details).
75 The
76 .I ms
77 macros are suitable for reports, letters, books, and
78 technical documentation.
79 .
80 .
81 .
82 .SH USAGE
83 .
84 The
85 .I ms
86 macro package expects files to have
87 a certain amount of structure.
88 The simplest documents can begin with a paragraph macro
89 and consist of text separated by paragraph macros
90 or even blank lines.
91 Longer documents have a structure as follows:
92 .
93 .TP
94 .B "Document type"
95 If you use the
96 .B RP
97 (report) macro at the beginning of the document,
98 .I groff
99 prints the cover page information on its own page;
100 otherwise it prints the information on the
101 first page with your document text immediately following.
102 Other document formats found in AT&T
103 .I troff
104 are specific to AT&T
105 or Berkeley, and are not supported in
106 .IR "groff ms" .
107 .
108 .TP
109 .B "Format and layout"
110 By setting number registers,
111 you can change your document's type (font and size),
112 margins, spacing, headers and footers, and footnotes.
113 See 
114 .I "Document control registers"
115 below for more details.
116 .
117 .TP
118 .B "Cover page"
119 A cover page consists of a title,
120 and optionally the author's name and institution,
121 an abstract, and the date.
122 See
123 .I "Cover page macros"
124 below for more details.
125 .
126 .TP
127 .B "Body"
128 Following the cover page is your document.
129 It consists of paragraphs, headings, and lists.
130 .
131 .TP
132 .B "Table of contents"
133 Longer documents usually include a table of contents,
134 which you can add by placing the
135 .B TC
136 macro at the end of your document.
137 .
138 .
139 .SS "Document control registers"
140 .
141 The following table lists the document control
142 number registers.
143 For the sake of consistency,
144 set registers related to margins at the beginning of your document,
145 or just after the
146 .B RP
147 macro.
148 .
149 .LP
150 .ne 12
151 .B Margin settings
152 .RS
153 .na
154 .TS
155 cb   cb cb cb
156 lfCW l  l  l.
157 Reg.    Definition      Effective       Default
158 _
159 PO      Page offset (left margin)       next page       1i
160 LL      Line length     next paragraph  6i
161 LT      Header/footer length    next paragraph  6i
162 HM      Top (header) margin     next page       1i
163 FM      Bottom (footer) margin  next page       1i
164 _
165 .TE
166 .RE
167 .
168 .LP
169 .ne 12
170 .B Text settings
171 .RS
172 .TS
173 cb   cb cb cb
174 lfCW lx l  l.
175 Reg.    Definition      Effective       Default
176 _
177 PS      T{
178 Point size
179 T}      next paragraph  10p
180 VS      T{
181 Line spacing (leading)
182 T}      next paragraph  12p
183 PSINCR  T{
184 Point size increment
185 for section headings of
186 increasing importance
187 T}      next heading    1p
188 GROWPS  T{
189 Heading level
190 beyond which PSINCR
191 is ignored
192 T}      next heading    0
193 _
194 .TE
195 .RE
196 .
197 .LP
198 .ne 11
199 .B Paragraph settings
200 .RS
201 .TS
202 cb   cb cb cb
203 lfCW lx l  l.
204 Reg.    Definition      Effective       Default
205 _
206 PI      T{
207 Initial indent
208 T}      next paragraph  5n
209 PD      T{
210 Space between paragraphs
211 T}      next paragraph  0.3v
212 QI      T{
213 Quoted paragraph indent
214 T}      next paragraph  5n
215 PORPHANS        T{
216 Number of initial lines
217 to be kept together
218 T}      next paragraph  1
219 HORPHANS        T{
220 Number of initial lines
221 to be kept with heading
222 T}      next heading    1
223 _
224 .TE
225 .RE
226 .
227 .LP
228 .ne 7
229 .B Footnote settings
230 .RS
231 .TS
232 cb   cb cb cb
233 lfCW l  l  l.
234 Reg.    Definition      Effective       Default
235 _
236 FL      Footnote length next footnote   \[rs]n[LL]*5/6
237 FI      Footnote indent next footnote   2n
238 FF      Footnote format next footnote   0
239 FPS     Point size      next footnote   \[rs]n[PS]-2
240 FVS     Vert. spacing   next footnote   \[rs]n[FPS]+2
241 FPD     Para. spacing   next footnote   \[rs]n[PD]/2
242 _
243 .TE
244 .RE
245 .
246 .LP
247 .ne 6
248 .B Other settings
249 .RS
250 .TS
251 cb   cb cb cb
252 lfCW l  l  l.
253 Reg.    Definition      Effective       Default
254 _
255 MINGW   Minimum width between columns   next page       2n
256 _
257 .TE
258 .ad
259 .RE
260 .
261 .
262 .SS "Cover page macros"
263 .
264 Use the following macros to create a cover page for your document
265 in the order shown.
266 .
267 .TP
268 .B .RP [no]
269 Specifies the report format for your document.
270 The report format creates a separate cover page.
271 With no
272 .B RP
273 macro,
274 .I groff
275 prints a subset of the
276 cover page on page\~1 of your document.
277 .
278 .IP
279 If you use the optional
280 .B no
281 argument,
282 .I groff
283 prints a title page but
284 does not repeat any of the title page information
285 (title, author, abstract, etc.\&)
286 on page\~1 of the document.
287 .
288 .TP
289 .B .P1 
290 (P-one) Prints the header on page\~1.
291 The default is to suppress the header.
292 .
293 .TP
294 .BI ".DA [" xxx ]
295 (optional) Print the current date,
296 or the arguments to the macro if any,
297 on the title page (if specified)
298 and in the footers.
299 This is the default for
300 .IR nroff .
301 .
302 .TP
303 .BI ".ND [" xxx ]
304 (optional) Print the current date,
305 or the arguments to the macro if any,
306 on the title page (if specified)
307 but not in the footers.
308 This is the default for
309 .IR troff .
310 .
311 .TP
312 .B .TL
313 Specifies the document title.
314 .I Groff
315 collects text following the
316 .B TL
317 macro into the title, until reaching the author name or abstract.
318 .
319 .TP
320 .B .AU
321 Specifies the author's name.
322 You can specify multiple authors by using an
323 .B AU
324 macro for each author.
325 .
326 .TP
327 .B .AI
328 Specifies the author's institution.
329 You can specify multiple institutions.
330 .
331 .TP
332 .B .AB [no]
333 Begins the abstract.
334 The default is to print the word
335 .BR ABSTRACT ,
336 centered and in italics, above the text of the abstract.
337 The option
338 .B no
339 suppresses this heading.
340 .
341 .TP
342 .B .AE
343 End the abstract.
344 .
345 .
346 .SS Paragraphs
347 .
348 Use the
349 .B PP
350 macro to create indented paragraphs,
351 and the
352 .B LP
353 macro to create paragraphs with no initial indent.
354 .
355 .PP
356 The
357 .B QP
358 macro indents all text at both left and right margins.
359 The effect is identical to the HTML
360 .B <BLOCKQUOTE>
361 element.
362 The next paragraph or heading
363 returns margins to normal.
364 .
365 .PP
366 The
367 .B XP
368 macro produces an exdented paragraph.
369 The first line of the paragraph begins at
370 the left margin,
371 and subsequent lines are indented
372 (the opposite of
373 .BR PP ).
374 .
375 .PP
376 For each of the above paragraph types,
377 and also for any list entry introduced by the
378 .B IP
379 macro
380 (described later),
381 the document control register
382 .BR PORPHANS ,
383 sets the
384 .I minimum
385 number of lines which must be printed,
386 after the start of the paragraph,
387 and before any page break occurs.
388 If there is insufficient space remaining on the current page
389 to accommodate this number of lines,
390 then a page break is forced
391 .I before
392 the first line of the paragraph is printed.
393 .
394 .PP
395 Similarly,
396 when a section heading
397 (see subsection
398 .I Headings
399 below)
400 preceeds any of these paragraph types,
401 the
402 .B HORPHANS
403 document control register specifies the
404 .I minimum
405 number of lines of the paragraph
406 which must be kept on the same page as the heading.
407 If insufficient space remains on the current page
408 to accommodate the heading and this number of lines of paragraph text,
409 then a page break is forced
410 .I before
411 the heading is printed.
412 .
413 .
414 .SS Headings
415 .
416 Use headings to create a hierarchical structure
417 for your document.
418 By default,
419 the
420 .I ms
421 macros print headings in
422 .B bold
423 using the same font family and point size as the body text.
424 For output devices which support scalable fonts,
425 this behaviour may be modified,
426 by defining the document control registers,
427 .B GROWPS
428 and
429 .BR PSINCR .
430 .
431 .PP
432 The following heading macros are available:
433 .
434 .TP
435 .BI .NH\  xx
436 Numbered heading.
437 The argument
438 .I xx
439 is either a numeric argument to indicate the
440 level of the heading, or
441 .I S\ xx\ xx\ \c
442 ".\|.\|."
443 to set the section number explicitly.
444 If you specify heading levels out of sequence,
445 such as invoking
446 .B ".NH\ 3"
447 after
448 .BR ".NH\ 1" ,
449 .I groff
450 prints a warning on standard error.
451 .
452 .IP
453 If the
454 .B GROWPS
455 register is set to a value
456 greater than the level of the heading,
457 then the point size of the heading will be increased by
458 .B PSINCR
459 units over the text size specified by the
460 .B PS
461 register,
462 for each level by which the heading level is less than
463 the value of
464 .BR GROWPS .
465 For example,
466 the sequence:
467 .
468 .RS
469 .ne 12
470 .nf
471 .IP
472 \&.nr PS 10
473 \&.nr GROWPS 3
474 \&.nr PSINCR 1.5p
475 \&.
476 \&.NH 1
477 Top Level Heading
478 \&.
479 \&.NH 2
480 Second Level Heading
481 \&.
482 \&.NH 3
483 Third Level Heading
484 .fi
485 .RE
486 .
487 .IP
488 will cause
489 .RI \*(lq 1.\ Top\ Level\ Heading \*(rq
490 to be printed in 13pt
491 .B bold
492 text, followed by
493 .RI \*(lq 1.1.\ Second\ Level\ Heading \*(rq
494 in 11.5pt
495 .B bold
496 text, while
497 .RI \*(lq 1.1.1.\ Third\ Level\ Heading \*(rq,
498 and all more deeply nested heading levels,
499 will remain in the 10pt
500 .B bold
501 text which is specified by the
502 .B PS
503 register.
504 .
505 .IP
506 Note that the value stored in
507 .B PSINCR
508 is interpreted in
509 .I groff
510 basic units;
511 the
512 .I p
513 scaling factor should be employed,
514 when assigning a value specified in points.
515 .
516 .IP
517 The style used to represent the section number,
518 within a numbered heading,
519 is controlled by the
520 .B SN-STYLE
521 string;
522 this may be set to either the
523 .B SN-DOT
524 or the
525 .B SN-NO-DOT
526 style,
527 (described below),
528 by aliasing
529 .B SN-STYLE
530 accordingly.
531 By default,
532 .B SN-STYLE
533 is initialised by defining the alias
534 .RS
535 .nf
536 .IP
537 \&.als SN-STYLE SN-DOT
538 .fi
539 .RE
540 .IP
541 it may be changed to the
542 .B SN-NO-DOT
543 style,
544 if preferred,
545 by defining the alternative alias
546 .RS
547 .nf
548 .IP
549 \&.als SN-STYLE SN-NO-DOT
550 .fi
551 .RE
552 .IP
553 Any such change becomes effective with the first use of
554 .BR .NH ,
555 .I after
556 the new alias is defined.
557 .
558 .IP
559 After invoking
560 .BR .NH ,
561 the assigned heading number is available in the strings
562 .B SN-DOT
563 (as it appears in the default formatting style for numbered headings,
564 with a terminating period following the number),
565 and
566 .B SN-NO-DOT
567 (with this terminating period omitted).
568 The string
569 .B SN
570 is also defined,
571 as an alias for
572 .BR SN-DOT ;
573 if preferred,
574 the user may redefine it as an alias for
575 .BR SN-NO-DOT ,
576 'ne 10
577 by including the initialisation:
578 .
579 .RS
580 .nf
581 .IP
582 \&.als SN SN-NO-DOT
583 .fi
584 .RE
585 .
586 .IP
587 at any time;
588 the change becomes effective with the next use of
589 .BR .NH ,
590 .I after
591 the new alias is defined.
592 .
593 .TP
594 .BI .SH\ [ xx ]
595 Unnumbered subheading.
596 The use of the optional
597 .I xx
598 argument is a GNU extension,
599 which adjusts the point size of the unnumbered subheading
600 to match that of a numbered heading,
601 introduced using
602 .BI .NH\  xx
603 with the same value of
604 .IR xx .
605 For example,
606 given the same settings for
607 .BR PS ,
608 .B GROWPS
609 and
610 .BR PSINCR ,
611 as used in the preceeding
612 .B .NH
613 example,
614 the sequence:
615 .
616 .RS
617 .ne
618 .nf
619 .IP
620 \&.SH 2
621 An Unnumbered Subheading
622 .fi
623 .RE
624 .
625 .IP
626 will print
627 .RI \*(lq "An Unnumbered Subheading" \*(rq
628 in 11.5pt
629 .B bold
630 text.
631 .
632 .
633 .SS Highlighting
634 .
635 The
636 .I ms
637 macros provide a variety of methods to highlight
638 or emphasize text:
639 .
640 .TP
641 .B ".B [\fItxt\fP [\fIpost\fP [\fIpre\fP]]]"
642 Sets its first argument in
643 .BR "bold type" .
644 If you specify a second argument,
645 .I groff
646 prints it in the previous font after
647 the bold text, with no intervening space
648 (this allows you to set punctuation after
649 the highlighted text without highlighting
650 the punctuation).
651 Similarly, it prints the third argument (if any)
652 in the previous font
653 .B before
654 the first argument.
655 For example,
656 .RS
657 .
658 .IP
659 \&.B foo ) (
660 .RE
661 .
662 .IP
663 prints
664 .RB ( foo ).
665 .
666 .IP
667 If you give this macro no arguments,
668 .I groff
669 prints all text following in bold until
670 the next highlighting, paragraph, or heading macro.
671 .
672 .TP
673 .B ".R [\fItxt\fP [\fIpost\fP [\fIpre\fP]]]"
674 Sets its first argument in
675 roman (or regular) type.
676 It operates similarly to the
677 .B B
678 macro otherwise.
679 .
680 .TP
681 .B ".I [\fItxt\fP [\fIpost\fP [\fIpre\fP]]]"
682 Sets its first argument in
683 .IR "italic type" .
684 It operates similarly to the
685 .B B
686 macro otherwise.
687 .
688 .TP
689 .B ".CW [\fItxt\fP [\fIpost\fP [\fIpre\fP]]]"
690 Sets its first argument in a constant width face.
691 It operates similarly to the
692 .B B
693 macro otherwise.
694 .
695 .TP
696 .B ".BI [\fItxt\fP [\fIpost\fP [\fIpre\fP]]]"
697 Sets its first argument in bold italic type.
698 It operates similarly to the
699 .B B
700 macro otherwise.
701 .
702 .TP
703 .BI ".BX [" txt ]
704 Prints its argument and draws a box around it.
705 If you want to box a string that contains spaces,
706 use a digit-width space (\[rs]0).
707 .
708 .TP
709 .BI ".UL [" txt " [" post ]]
710 Prints its first argument with an underline.
711 If you specify a second argument,
712 .I groff
713 prints it in the previous font after
714 the underlined text, with no intervening space.
715 .
716 .TP
717 .B .LG
718 Prints all text following in larger type
719 (2\~points larger than the current point size) until
720 the next font size, highlighting, paragraph, or heading macro.
721 You can specify this macro multiple times
722 to enlarge the point size as needed.
723 .
724 .TP
725 .B .SM
726 Prints all text following in
727 smaller type
728 (2\~points smaller than the current point size) until
729 the next type size, highlighting, paragraph, or heading macro.
730 You can specify this macro multiple times
731 to reduce the point size as needed.
732 .
733 .TP
734 .B .NL
735 Prints all text following in
736 the normal point size
737 (that is, the value of the
738 .B PS
739 register).
740 .
741 .TP
742 .BI \[rs]*{ text \[rs]*}
743 Print the enclosed
744 .I text
745 as a superscript.
746 .
747 .
748 .SS Indents
749 .
750 You may need to indent sections of text.
751 A typical use for indents is to create nested lists and sublists.
752 .
753 .PP
754 Use the
755 .B RS
756 and
757 .B RE
758 macros to start and end a section of indented text, respectively.
759 The
760 .B PI
761 register controls the amount of indent.
762 .
763 .PP
764 You can nest indented sections as deeply as needed by
765 using multiple, nested pairs of
766 .B RS
767 and
768 .BR RE .
769 .
770 .
771 .SS Lists
772 .
773 The
774 .B IP
775 macro handles duties for all lists.
776 Its syntax is as follows:
777 .
778 .TP
779 .BI ".IP [" marker " [" width ]]
780 .
781 .IP
782 The
783 .I marker
784 is usually a bullet character
785 .B \[rs](bu
786 for unordered lists,
787 a number (or auto-incrementing number register) for numbered lists,
788 or a word or phrase for indented (glossary-style) lists.
789 .
790 .IP
791 The
792 .I width
793 specifies the indent for the body of each list item.
794 Once specified, the indent remains the same for all
795 list items in the document until specified again.
796 .\" -----
797 .br
798 .ne 15
799 .
800 .
801 .SS "Tab stops"
802 .
803 Use the
804 .B ta
805 request to set tab stops as needed.
806 Use the
807 .B TA
808 macro to reset tabs to the default (every 5n).
809 You can redefine the
810 .B TA
811 macro to create a different set of default tab stops.
812 .
813 .
814 .SS "Displays and keeps"
815 .
816 Use displays to show text-based examples or figures
817 (such as code listings).
818 Displays turn off filling, so lines of code can be
819 displayed as-is without inserting
820 .B br
821 requests in between each line.
822 Displays can be 
823 .I kept
824 on a single page, or allowed to break across pages.
825 The following table shows the display types available.
826 .RS
827 .ne 11
828 .na
829 .TS
830 cb   s    cbt
831 cb   cb   ^
832 lfCW lfCW lx.
833 Display macro   Type of display
834 With keep       No keep
835 _
836 \&.DS L \&.LD   Left-justified.
837 \&.DS I [\fIindent\fP]  \&.ID   T{
838 Indented (default indent in the \fBDI\fP register).
839 T}
840 \&.DS B \&.BD   T{
841 Block-centered (left-justified, longest line centered).
842 T}
843 \&.DS C \&.CD   Centered.
844 \&.DS R \&.RD   Right-justified.
845 _
846 .TE
847 .RE
848 .ad
849 .
850 .LP
851 Use the
852 .B DE
853 macro to end any display type.
854 The macros
855 .B Ds
856 and
857 .B De
858 were formerly provided as aliases for
859 .B DS
860 and
861 .BR DE ,
862 respectively, but they have been removed, and should no longer be used.
863 X11 documents which actually use
864 .B Ds
865 and
866 .B De
867 always load a specific macro file from the X11 distribution (macros.t)
868 which provides proper definitions for the two macros.
869 .PP
870 To
871 .I keep
872 text together on a page,
873 such as
874 a paragraph that refers to a table (or list, or other item)
875 immediately following, use the
876 .B KS
877 and
878 .B KE
879 macros.
880 The
881 .B KS
882 macro begins a block of text to be kept on a single page,
883 and the
884 .B KE
885 macro ends the block.
886 .
887 .PP
888 You can specify a
889 .I "floating keep"
890 using the
891 .B KF
892 and
893 .B KE
894 macros.
895 If the keep cannot fit on the current page,
896 .I groff
897 holds the contents of the keep and allows text following
898 the keep (in the source file) to fill in the remainder of
899 the current page.
900 When the page breaks,
901 whether by an explicit
902 .B bp
903 request or by reaching the end of the page,
904 .I groff
905 prints the floating keep at the top of the new page.
906 This is useful for printing large graphics or tables
907 that do not need to appear exactly where specified.
908 .
909 .PP
910 The macros
911 .B B1
912 and
913 .B B2
914 can be used to enclose a text within a box;
915 .B .B1
916 begins the box, and
917 .B .B2
918 ends it.
919 Text in the box is automatically placed in a diversion
920 (keep).
921 .
922 .
923 .SS "Tables, figures, equations, and references"
924 .
925 The
926 .I -ms
927 macros support the standard
928 .I groff
929 preprocessors:
930 .IR tbl ,
931 .IR pic ,
932 .IR eqn ,
933 and
934 .IR refer .
935 Mark text meant for preprocessors by enclosing it
936 in pairs of tags as follows:
937 .
938 .TP
939 .BR ".TS [H]" " and " .TE
940 Denotes a table, to be processed by the
941 .I tbl
942 preprocessor.
943 The optional
944 .BR H "\~argument"
945 instructs
946 .I groff
947 to create a running header with the information
948 up to the
949 .B TH
950 macro.
951 .I Groff
952 prints the header at the beginning of the table;
953 if the table runs onto another page,
954 .I groff
955 prints the header on the next page as well.
956 .
957 .TP
958 .BR .PS " and " .PE
959 Denotes a graphic, to be processed by the
960 .I pic
961 preprocessor.
962 You can create a
963 .I pic
964 file by hand, using the
965 AT&T
966 .I pic
967 manual available on the Web as a reference,
968 or by using a graphics program such as
969 .IR xfig .
970 .
971 .TP
972 .BR ".EQ [\fI\,align\/\fP]" " and " .EN
973 Denotes an equation, to be processed by the
974 .I eqn
975 preprocessor.
976 The optional
977 .I align
978 argument can be
979 .BR C ,
980 .BR L ,
981 or\~\c
982 .B I
983 to center (the default), left-justify, or indent
984 the equation.
985 .
986 .TP
987 .BR .[ " and " .]
988 Denotes a reference, to be processed by the
989 .I refer
990 preprocessor.
991 The GNU
992 .IR @g@refer (@MAN1EXT@)
993 manual page provides a comprehensive reference
994 to the preprocessor and the format of the
995 bibliographic database.
996 .
997 .
998 .SS Footnotes
999 .
1000 The
1001 .I ms
1002 macros provide a flexible footnote system.
1003 You can specify a numbered footnote by using the
1004 .B \[rs]**
1005 escape, followed by the text of the footnote
1006 enclosed by
1007 .B FS
1008 and
1009 .B FE
1010 macros.
1011 .
1012 .PP
1013 You can specify symbolic footnotes
1014 by placing the mark character (such as
1015 .B \[rs](dg
1016 for the dagger character) in the body text,
1017 followed by the text of the footnote
1018 enclosed by
1019 .B FS\ \[rs](dg
1020 and
1021 .B FE
1022 macros.
1023 .
1024 .PP
1025 You can control how
1026 .I groff
1027 prints footnote numbers by changing the value of the
1028 .B FF
1029 register as follows:
1030 .RS
1031 .ne 7
1032 .
1033 .TP
1034 0
1035 Prints the footnote number as a superscript; indents the footnote (default).
1036 .
1037 .TP
1038 1
1039 Prints the number followed by a period (like\~1.\&)
1040 and indents the footnote.
1041 .
1042 .TP
1043 2
1044 Like\~1, without an indent.
1045 .
1046 .TP
1047 3
1048 Like\~1, but prints the footnote number as a hanging paragraph.
1049 .
1050 .LP
1051 .RE
1052 You can use footnotes safely within keeps and displays,
1053 but avoid using numbered footnotes within floating keeps.
1054 You can set a second
1055 .B \[rs]**
1056 between a
1057 .B \[rs]**
1058 and its corresponding
1059 .BR .FS ;
1060 as long as each
1061 .B .FS
1062 occurs
1063 .I after
1064 the corresponding
1065 .B \[rs]**
1066 and the occurrences of
1067 .B .FS
1068 are in the same order as the corresponding occurrences of
1069 .BR \[rs]** .
1070 .
1071 .
1072 .SS "Headers and footers"
1073 .
1074 There are three ways to define headers and footers:
1075 .
1076 .IP \(bu 3n
1077 Use the strings
1078 .BR LH ,
1079 .BR CH ,
1080 and
1081 .B RH
1082 to set the left, center, and right headers; use
1083 .BR LF ,
1084 .BR CF ,
1085 and
1086 .B RF
1087 to set the left, center, and right footers.
1088 This works best for documents that do not distinguish
1089 between odd and even pages.
1090 .
1091 .IP \(bu
1092 Use the
1093 .B OH
1094 and
1095 .B EH
1096 macros to define headers for the odd and even pages; and
1097 .B OF
1098 and
1099 .B EF
1100 macros to define footers for the odd and even pages.
1101 This is more flexible than defining the individual strings.
1102 The syntax for these macros is as follows:
1103 .RS
1104 .
1105 .IP
1106 .B ".OH '\fIleft\fP'\fIcenter\fP'\fIright\fP'"
1107 .RE
1108 .
1109 .IP
1110 You can replace the quote (') marks with any character not
1111 appearing in the header or footer text.
1112 .
1113 .PP
1114 You can also redefine the
1115 .B PT
1116 and
1117 .B BT
1118 macros to change the behavior of
1119 the header and footer, respectively.
1120 The header process also calls the (undefined)
1121 .B HD
1122 macro after
1123 .B PT ;
1124 you can define this macro if you need additional processing
1125 after printing the header
1126 (for example, to draw a line below the header).
1127 .
1128 .
1129 .SS Margins
1130 .
1131 You control margins using a set of number registers.
1132 The following table lists the register names and defaults:
1133 .RS
1134 .ne 8
1135 .na
1136 .TS
1137 cb   cb cb cb
1138 lfCW l  l  l.
1139 Reg.    Definition      Effective       Default
1140 _
1141 PO      Page offset (left margin)       next page       1i
1142 LL      Line length     next paragraph  6i
1143 LT      Header/footer length    next paragraph  6i
1144 HM      Top (header) margin     next page       1i
1145 FM      Bottom (footer) margin  next page       1i
1146 _
1147 .TE
1148 .RE
1149 .ad
1150 .
1151 .PP
1152 Note that there is no right margin setting.
1153 The combination of page offset and line length
1154 provide the information necessary to
1155 derive the right margin.
1156 .
1157 .
1158 .SS "Multiple columns"
1159 .
1160 The
1161 .I ms
1162 macros can set text in as many columns as will reasonably
1163 fit on the page.
1164 The following macros are available.
1165 All of them force a page break if a multi-column mode is already set.
1166 However, if the current mode is single-column, starting a multi-column
1167 mode does
1168 .I not
1169 force a page break.
1170 .
1171 .TP
1172 .B .1C
1173 Single-column mode.
1174 .
1175 .TP
1176 .B .2C
1177 Two-column mode.
1178 .
1179 .TP
1180 .BI ".MC [" width " [" gutter ]]
1181 Multi-column mode.
1182 If you specify no arguments, it is equivalent to the
1183 .B 2C
1184 macro.
1185 Otherwise,
1186 .I width
1187 is the width of each column and
1188 .I gutter
1189 is the space between columns.
1190 The
1191 .B MINGW
1192 number register is the default gutter width.
1193 .
1194 .
1195 .SS "Creating a table of contents"
1196 .
1197 Wrap text that you want to appear in the
1198 table of contents in
1199 .B XS
1200 and
1201 .B XE
1202 macros.
1203 Use the
1204 .B TC
1205 macro to print the table of contents at the end of the document,
1206 resetting the page number to\~\c
1207 .B i
1208 (Roman numeral\~1).
1209 .
1210 .PP
1211 You can manually create a table of contents
1212 by specifying a page number as the first argument to
1213 .BR XS .
1214 Add subsequent entries using the
1215 .B XA
1216 macro.
1217 For example:
1218 .RS
1219 .
1220 .PP
1221 .ne 8
1222 .nf
1223 \&.XS 1
1224 Introduction
1225 \&.XA 2
1226 A Brief History of the Universe
1227 \&.XA 729
1228 Details of Galactic Formation
1229 \&.\|.\|.
1230 \&.XE
1231 .fi
1232 .RE  
1233 .
1234 .LP  
1235 Use the
1236 .B PX  
1237 macro to print a manually-generated table of contents
1238 without resetting the page number.
1239 .
1240 .PP
1241 If you give the argument
1242 .B no
1243 to either
1244 .B PX
1245 or   
1246 .BR TC ,
1247 .I groff
1248 suppresses printing the title
1249 specified by the
1250 .B \[rs]*[TOC]  
1251 string.
1252 .
1253 .
1254 .SS "Fractional point sizes"
1255 .
1256 Traditionally, the
1257 .I ms
1258 macros only support integer values for the document's font size and
1259 vertical spacing.
1260 To overcome this restriction, values larger than or equal to 1000 are taken
1261 as fractional values, multiplied by 1000.
1262 For example, `.nr\~PS\~10250' sets the font size to 10.25 points.
1263 .
1264 .LP
1265 The following four registers accept fractional point sizes:
1266 .BR PS ,
1267 .BR VS ,
1268 .BR FPS ,
1269 and
1270 .BR FVS .
1271 .
1272 .LP
1273 Due to backwards compatibility, the value of
1274 .B VS
1275 must be smaller than 40000 (this is 40.0 points).
1276 .
1277 .
1278 .
1279 .SH "DIFFERENCES FROM troff ms"
1280 .
1281 The
1282 .I "groff ms"
1283 macros are a complete re-implementation,
1284 using no original AT&T code.
1285 Since they take advantage of the extended features in
1286 .IR groff ,
1287 they cannot be used with AT&T
1288 .IR troff .
1289 Other differences include:
1290 .
1291 .IP \(bu 3n
1292 The internals of
1293 .I "groff ms"
1294 differ from the internals of Unix
1295 .IR ms . 
1296 Documents that depend upon implementation details of Unix
1297 .I ms
1298 may not format properly with
1299 .IR "groff ms" .
1300 .
1301 .IP \(bu
1302 The error-handling policy of
1303 .I "groff ms"
1304 is to detect and report errors,
1305 rather than silently to ignore them.
1306 .
1307 .IP \(bu
1308 Some Bell Labs localisms are not implemented by default.
1309 However, if you call the otherwise undocumented
1310 .BR SC 
1311 section-header macro, you will enable implementations of three other
1312 archaic Bell Labs macros:
1313 .BR UC ,
1314 .BR P1 ,
1315 and 
1316 .BR P2 .
1317 These are not enabled by default because (a)\~they were not documented, 
1318 in the original 
1319 .IR "ms manual" ,
1320 and (b)\~the
1321 .B P1
1322 and 
1323 .B UC
1324 macros both collide with different macros in the Berkeley version of
1325 .IR ms .
1326 .
1327 .IP
1328 These emulations are sufficient to give back the 1976 Kernighan\~& Cherry
1329 paper
1330 .I "Typsetting Mathematics \(en User's Guide"
1331 its section headings, and restore some text that had gone missing as
1332 arguments of undefined macros.
1333 No warranty express or implied is given as to how well the typographic
1334 details these produce match the original Bell Labs macros.
1335 .
1336 .IP \(bu
1337 Berkeley localisms, in particular the
1338 .B TM
1339 and
1340 .B CT
1341 macros,
1342 are not implemented.
1343 .
1344 .IP \(bu
1345 .I "Groff ms"
1346 does not work in compatibility mode (e.g., with the
1347 .B \-C
1348 option).
1349 .
1350 .IP \(bu
1351 There is no support for typewriter-like devices.
1352 .
1353 .IP \(bu
1354 .I "Groff ms"
1355 does not provide cut marks.
1356 .
1357 .IP \(bu
1358 Multiple line spacing is not supported
1359 (use a larger vertical spacing instead).
1360 .
1361 .IP \(bu
1362 Some Unix
1363 .I ms
1364 documentation says that the
1365 .B CW
1366 and
1367 .B GW
1368 number registers can be used to control the column width and
1369 gutter width, respectively.
1370 These number registers are not used in
1371 .IR "groff ms" .
1372 .
1373 .IP \(bu
1374 Macros that cause a reset
1375 (paragraphs, headings, etc.\&)
1376 may change the indent.
1377 Macros that change the indent do not increment or decrement
1378 the indent, but rather set it absolutely.
1379 This can cause problems for documents that define
1380 additional macros of their own.
1381 The solution is to use not the
1382 .B in
1383 request but instead the
1384 .B RS
1385 and
1386 .B RE
1387 macros.
1388 .
1389 .IP \(bu
1390 The number register
1391 .B GS
1392 is set to\~1 by the
1393 .I "groff ms"
1394 macros,
1395 but is not used by the Unix
1396 .I ms
1397 macros.
1398 Documents that need to determine whether
1399 they are being formatted with Unix
1400 .I ms
1401 or
1402 .I "groff ms"
1403 should use this number register.
1404 .
1405 .IP \(bu
1406 To make
1407 .I "groff ms"
1408 use the default page offset (which also specifies the left margin),
1409 the
1410 .B PO
1411 number register must stay undefined until the first
1412 .B ms
1413 macro is evaluated.
1414 This implies that
1415 .B PO
1416 should not be used early in the document, unless it is changed also:
1417 Remember that accessing an undefined register automatically defines it.
1418 .br
1419 .ne 23
1420 .
1421 .
1422 .SS Strings
1423 .
1424 You can redefine the following strings to adapt the
1425 .I "groff ms"
1426 macros to languages other than English:
1427 .TS
1428 center;
1429 cb   cb
1430 lfCW l.
1431 String  Default Value
1432 _
1433 REFERENCES      References
1434 ABSTRACT        ABSTRACT
1435 TOC     Table of Contents
1436 MONTH1  January
1437 MONTH2  February
1438 MONTH3  March
1439 MONTH4  April
1440 MONTH5  May
1441 MONTH6  June
1442 MONTH7  July
1443 MONTH8  August
1444 MONTH9  September
1445 MONTH10 October
1446 MONTH11 November
1447 MONTH12 December
1448 _
1449 .TE
1450 .
1451 .PP
1452 The
1453 .B \[rs]*-
1454 string produces an em dash \[em] like this.
1455 .
1456 .PP
1457 Use
1458 .B \[rs]*Q
1459 and
1460 .B \[rs]*U
1461 to get a left and right typographer's quote,
1462 respectively, in
1463 .I troff
1464 (and plain quotes in
1465 .IR nroff ).
1466
1467 .
1468 .
1469 .SS Text Settings
1470 .
1471 The
1472 .B FAM
1473 string sets the default font family.
1474 If this string is undefined at initialization,
1475 it is set to Times.
1476 .
1477 .LP
1478 The point size, vertical spacing, and inter-paragraph spacing for footnotes
1479 are controlled by the number registers
1480 .BR FPS ,
1481 .BR FVS ,
1482 and
1483 .BR FPD ;
1484 at initialization these are set to
1485 .BR \[rs]n(PS-2 ,
1486 .BR \[rs]n[FPS]+2 ,
1487 and
1488 .BR \[rs]n(PD/2 ,
1489 respectively.
1490 If any of these registers are defined before initialization,
1491 the initialization macro does not change them.
1492 .
1493 .LP
1494 The hyphenation flags (as set by the
1495 .B hy
1496 request) are set from the
1497 .B HY
1498 register;
1499 the default is\~14.
1500 .
1501 .PP
1502 Improved accent marks
1503 (as originally defined in Berkeley's
1504 .I ms
1505 version)
1506 are available by specifying the
1507 .B AM
1508 macro at the beginning of your document.
1509 You can place an accent over most characters
1510 by specifying the string defining the accent
1511 directly after the character.
1512 For example,
1513 .B n\[rs]*~ 
1514 produces an n with a tilde over it.
1515 .
1516 .
1517 .
1518 .SH "NAMING CONVENTIONS"
1519 .
1520 .
1521 .LP
1522 The following conventions are used for names of macros, strings and
1523 number registers.
1524 External names available to documents that use the
1525 .I "groff ms"
1526 macros contain only uppercase letters and digits.
1527 .
1528 .LP
1529 Internally the macros are divided into modules;
1530 naming conventions are as follows:
1531 .
1532 .IP \(bu 3n
1533 Names used only within one module are of the form
1534 .IB \%module * name\fR.
1535 .
1536 .IP \(bu
1537 Names used outside the module in which they are defined are of the form
1538 .IB \%module @ name\fR.
1539 .
1540 .IP \(bu
1541 Names associated with a particular environment are of the form
1542 .IB \%environment : name\fR;
1543 these are used only within the
1544 .B par
1545 module.
1546 .
1547 .IP \(bu
1548 .I name
1549 does not have a module prefix.
1550 .
1551 .IP \(bu
1552 Constructed names used to implement arrays are of the form
1553 .IB \%array ! index\fR.
1554 .
1555 .PP
1556 Thus the groff ms macros reserve the following names:
1557 .
1558 .IP \(bu 3n
1559 Names containing the characters
1560 .BR * ,
1561 .BR @ ,
1562 and\~\c
1563 .BR : .
1564 .
1565 .IP \(bu
1566 Names containing only uppercase letters and digits.
1567 .
1568 .
1569 .
1570 .SH FILES
1571 .
1572 .B @MACRODIR@/ms.tmac
1573 (a wrapper file for
1574 .BR s.tmac )
1575 .br
1576 .B @MACRODIR@/s.tmac
1577 .
1578 .
1579 .
1580 .SH "SEE ALSO"
1581 .
1582 .BR groff (@MAN1EXT@),
1583 .BR @g@troff (@MAN1EXT@),
1584 .BR @g@tbl (@MAN1EXT@),
1585 .BR @g@pic (@MAN1EXT@),
1586 .BR @g@eqn (@MAN1EXT@),
1587 .BR @g@refer (@MAN1EXT@),
1588 .I Groff: The GNU Implementation of troff
1589 by Trent Fisher and Werner Lemberg.
1590 .
1591 .
1592 .
1593 .SH AUTHOR
1594 .
1595 Original manual page by James Clark
1596 .IR "et al" ;
1597 rewritten by Larry Kollar
1598 (\fIlkollar@despammed.com\fR).
1599 .
1600 .cp \n[groff_ms_C]
1601 .
1602 .\" Local Variables:
1603 .\" mode: nroff
1604 .\" End: