s/2006/2007/.
[s-roff.git] / tmac / groff_ms.man
bloba9e0aee460c03a35c8b57fcde61ba00dc540997e
1 '\" t
2 .ig
3 Copyright (C) 1989-1995, 2001, 2002, 2003, 2004, 2005, 2006
4   Free Software Foundation, Inc.
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.
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.
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.
22 .do nr groff_ms_C \n[.C]
23 .cp 0
25 .TH GROFF_MS @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@"
29 .SH NAME
31 groff_ms \- groff ms macros
35 .SH SYNOPSIS
37 .B groff
38 .B \-ms
40 .IR options .\|.\|.\&
43 .IR files .\|.\|.\&
45 .br
46 .B groff
47 .B \-m\ ms
49 .IR options .\|.\|.\&
52 .IR files .\|.\|.\&
57 .SH DESCRIPTION
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.
82 .SH USAGE
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:
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" .
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.
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.
123 .I "Cover page macros"
124 below for more details.
127 .B "Body"
128 Following the cover page is your document.
129 It consists of paragraphs, headings, and lists.
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.
139 .SS "Document control registers"
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.
150 .ne 12
151 .B Margin settings
155 cb   s cb s s cb s cb s
156 afCW s l  s s l  s l  s.
157 Reg.    Definition      Effective       Default
159 PO      T{
160 Page offset (left margin)
161 T}      T{
162 next page
163 T}      1i
164 LL      T{
165 Line length
166 T}      next para.      6i
167 LT      T{
168 Header/footer length
169 T}      next para.      6i
170 HM      T{
171 Top (header) margin
172 T}      next page       1i
173 FM      T{
174 Bottom (footer) margin
175 T}      next page       1i
181 .ne 12
182 .B Text settings
185 cb   s cb s s cb s cb s
186 afCW s l  s s l  s l  s.
187 Reg.    Definition      Effective       Default
189 PS      T{
190 Point size
191 T}      next para.      10p
192 VS      T{
193 Line spacing (leading)
194 T}      next para.      12p
195 PSINCR  T{
196 Point size increment
197 for section headings of
198 increasing importance
199 T}      next heading    1p
200 GROWPS  T{
201 Heading level
202 beyond which PSINCR
203 is ignored
204 T}      next heading    0
210 .ne 11
211 .B Paragraph settings
214 cb cb s cb cb
215 afCW l s l l .
216 Reg.    Definition      Effective       Default
218 PI      T{
219 Initial indent
220 T}      next para.      5n
221 PD      T{
222 Space between paragraphs
223 T}      next para.      0.3v
224 QI      T{
225 Quoted paragraph indent
226 T}      next para.      5n
227 PORPHANS        T{
228 Number of initial lines
229 to be kept together
230 T}      next para.      1
231 HORPHANS        T{
232 Number of initial lines
233 to be kept with heading
234 T}      next heading    1
240 .ne 7
241 .B Footnote settings
244 cb cb cb cb
245 afCW l l l .
246 Reg.    Definition      Effective       Default
248 FL      Footnote length next footnote   \[rs]n[LL]*5/6
249 FI      Footnote indent next footnote   2n
250 FF      Footnote format next footnote   0
251 FPS     Point size      next footnote   \[rs]n[PS]-2
252 FVS     Vert. spacing   next footnote   \[rs]n[FPS]+2
253 FPD     Para. spacing   next footnote   \[rs]n[PD]/2
259 .ne 6
260 .B Other settings
263 cb   s cb s s cb s cb s
264 afCW s l  s s l  s l  s.
265 Reg.    Definition      Effective       Default
267 MINGW   T{
268 Minimum width between columns
269 T}      next page       2n
276 .SS "Cover page macros"
278 Use the following macros to create a cover page for your document
279 in the order shown.
282 .B .RP [no]
283 Specifies the report format for your document.
284 The report format creates a separate cover page.
285 With no
286 .B RP
287 macro,
288 .I groff
289 prints a subset of the
290 cover page on page\~1 of your document.
293 If you use the optional
294 .B no
295 argument,
296 .I groff
297 prints a title page but
298 does not repeat any of the title page information
299 (title, author, abstract, etc.\&)
300 on page\~1 of the document.
303 .B .P1 
304 (P-one) Prints the header on page\~1.
305 The default is to suppress the header.
308 .BI ".DA [" xxx ]
309 (optional) Print the current date,
310 or the arguments to the macro if any,
311 on the title page (if specified)
312 and in the footers.
313 This is the default for
314 .IR nroff .
317 .BI ".ND [" xxx ]
318 (optional) Print the current date,
319 or the arguments to the macro if any,
320 on the title page (if specified)
321 but not in the footers.
322 This is the default for
323 .IR troff .
326 .B .TL
327 Specifies the document title.
328 .I Groff
329 collects text following the
330 .B TL
331 macro into the title, until reaching the author name or abstract.
334 .B .AU
335 Specifies the author's name.
336 You can specify multiple authors by using an
337 .B AU
338 macro for each author.
341 .B .AI
342 Specifies the author's institution.
343 You can specify multiple institutions.
346 .B .AB [no]
347 Begins the abstract.
348 The default is to print the word
349 .BR ABSTRACT ,
350 centered and in italics, above the text of the abstract.
351 The option
352 .B no
353 suppresses this heading.
356 .B .AE
357 End the abstract.
360 .SS Paragraphs
362 Use the
363 .B PP
364 macro to create indented paragraphs,
365 and the
366 .B LP
367 macro to create paragraphs with no initial indent.
371 .B QP
372 macro indents all text at both left and right margins.
373 The effect is identical to the HTML
374 .B <BLOCKQUOTE>
375 element.
376 The next paragraph or heading
377 returns margins to normal.
381 .B XP
382 macro produces an exdented paragraph.
383 The first line of the paragraph begins at
384 the left margin,
385 and subsequent lines are indented
386 (the opposite of
387 .BR PP ).
390 For each of the above paragraph types,
391 and also for any list entry introduced by the
392 .B IP
393 macro
394 (described later),
395 the document control register
396 .BR PORPHANS ,
397 sets the
398 .I minimum
399 number of lines which must be printed,
400 after the start of the paragraph,
401 and before any page break occurs.
402 If there is insufficient space remaining on the current page
403 to accommodate this number of lines,
404 then a page break is forced
405 .I before
406 the first line of the paragraph is printed.
409 Similarly,
410 when a section heading
411 (see subsection
412 .I Headings
413 below)
414 preceeds any of these paragraph types,
416 .B HORPHANS
417 document control register specifies the
418 .I minimum
419 number of lines of the paragraph
420 which must be kept on the same page as the heading.
421 If insufficient space remains on the current page
422 to accommodate the heading and this number of lines of paragraph text,
423 then a page break is forced
424 .I before
425 the heading is printed.
428 .SS Headings
430 Use headings to create a hierarchical structure
431 for your document.
432 By default,
434 .I ms
435 macros print headings in
436 .B bold
437 using the same font family and point size as the body text.
438 For output devices which support scalable fonts,
439 this behaviour may be modified,
440 by defining the document control registers,
441 .B GROWPS
443 .BR PSINCR .
446 The following heading macros are available:
449 .BI .NH\  xx
450 Numbered heading.
451 The argument
452 .I xx
453 is either a numeric argument to indicate the
454 level of the heading, or
455 .I S\ xx\ xx\ \c
456 ".\|.\|."
457 to set the section number explicitly.
458 If you specify heading levels out of sequence,
459 such as invoking
460 .B ".NH\ 3"
461 after
462 .BR ".NH\ 1" ,
463 .I groff
464 prints a warning on standard error.
467 If the
468 .B GROWPS
469 register is set to a value
470 greater than the level of the heading,
471 then the point size of the heading will be increased by
472 .B PSINCR
473 units over the text size specified by the
474 .B PS
475 register,
476 for each level by which the heading level is less than
477 the value of
478 .BR GROWPS .
479 For example,
480 the sequence:
483 .ne 12
486 \&.nr PS 10
487 \&.nr GROWPS 3
488 \&.nr PSINCR 1.5p
490 \&.NH 1
491 Top Level Heading
493 \&.NH 2
494 Second Level Heading
496 \&.NH 3
497 Third Level Heading
502 will cause
503 .RI \*(lq 1.\ Top\ Level\ Heading \*(rq
504 to be printed in 13pt
505 .B bold
506 text, followed by
507 .RI \*(lq 1.1.\ Second\ Level\ Heading \*(rq
508 in 11.5pt
509 .B bold
510 text, while
511 .RI \*(lq 1.1.1.\ Third\ Level\ Heading \*(rq,
512 and all more deeply nested heading levels,
513 will remain in the 10pt
514 .B bold
515 text which is specified by the
516 .B PS
517 register.
520 Note that the value stored in
521 .B PSINCR
522 is interpreted in
523 .I groff
524 basic units;
526 .I p
527 scaling factor should be employed,
528 when assigning a value specified in points.
531 After invoking
532 .BR .NH ,
533 the assigned heading number is available in the strings
534 .B SN-DOT
535 (exactly as it appears in the formatted heading),
537 .B SN-NO-DOT
538 (with its final period omitted).
539 The string
540 .B SN
541 is also defined,
542 as an alias for
543 .BR SN-DOT ;
544 if preferred,
545 the user may redefine it as an alias for
546 .BR SN-NO-DOT ,
547 'ne 10
548 by including the initialisation:
553 \&.ds SN-NO-DOT
554 \&.als SN SN-NO-DOT
559 .I before
560 the first use of
561 .BR .NH ,
562 or simply:
567 \&.als SN SN-NO-DOT
572 .I after
573 the first use of
574 .BR .NH .
577 .BI .SH\ [ xx ]
578 Unnumbered subheading.
579 The use of the optional
580 .I xx
581 argument is a GNU extension,
582 which adjusts the point size of the unnumbered subheading
583 to match that of a numbered heading,
584 introduced using
585 .BI .NH\  xx
586 with the same value of
587 .IR xx .
588 For example,
589 given the same settings for
590 .BR PS ,
591 .B GROWPS
593 .BR PSINCR ,
594 as used in the preceeding
595 .B .NH
596 example,
597 the sequence:
603 \&.SH 2
604 An Unnumbered Subheading
609 will print
610 .RI \*(lq "An Unnumbered Subheading" \*(rq
611 in 11.5pt
612 .B bold
613 text.
616 .SS Highlighting
619 .I ms
620 macros provide a variety of methods to highlight
621 or emphasize text:
624 .B ".B [\fItxt\fP [\fIpost\fP [\fIpre\fP]]]"
625 Sets its first argument in
626 .BR "bold type" .
627 If you specify a second argument,
628 .I groff
629 prints it in the previous font after
630 the bold text, with no intervening space
631 (this allows you to set punctuation after
632 the highlighted text without highlighting
633 the punctuation).
634 Similarly, it prints the third argument (if any)
635 in the previous font
636 .B before
637 the first argument.
638 For example,
642 \&.B foo ) (
646 prints
647 .RB ( foo ).
650 If you give this macro no arguments,
651 .I groff
652 prints all text following in bold until
653 the next highlighting, paragraph, or heading macro.
656 .B ".R [\fItxt\fP [\fIpost\fP [\fIpre\fP]]]"
657 Sets its first argument in
658 roman (or regular) type.
659 It operates similarly to the
660 .B B
661 macro otherwise.
664 .B ".I [\fItxt\fP [\fIpost\fP [\fIpre\fP]]]"
665 Sets its first argument in
666 .IR "italic type" .
667 It operates similarly to the
668 .B B
669 macro otherwise.
672 .B ".CW [\fItxt\fP [\fIpost\fP [\fIpre\fP]]]"
673 Sets its first argument in a constant width face.
674 It operates similarly to the
675 .B B
676 macro otherwise.
679 .B ".BI [\fItxt\fP [\fIpost\fP [\fIpre\fP]]]"
680 Sets its first argument in bold italic type.
681 It operates similarly to the
682 .B B
683 macro otherwise.
686 .BI ".BX [" txt ]
687 Prints its argument and draws a box around it.
688 If you want to box a string that contains spaces,
689 use a digit-width space (\[rs]0).
692 .BI ".UL [" txt " [" post ]]
693 Prints its first argument with an underline.
694 If you specify a second argument,
695 .I groff
696 prints it in the previous font after
697 the underlined text, with no intervening space.
700 .B .LG
701 Prints all text following in larger type
702 (2\~points larger than the current point size) until
703 the next font size, highlighting, paragraph, or heading macro.
704 You can specify this macro multiple times
705 to enlarge the point size as needed.
708 .B .SM
709 Prints all text following in
710 smaller type
711 (2\~points smaller than the current point size) until
712 the next type size, highlighting, paragraph, or heading macro.
713 You can specify this macro multiple times
714 to reduce the point size as needed.
717 .B .NL
718 Prints all text following in
719 the normal point size
720 (that is, the value of the
721 .B PS
722 register).
725 .BI \[rs]*{ text \[rs]*}
726 Print the enclosed
727 .I text
728 as a superscript.
731 .SS Indents
733 You may need to indent sections of text.
734 A typical use for indents is to create nested lists and sublists.
737 Use the
738 .B RS
740 .B RE
741 macros to start and end a section of indented text, respectively.
743 .B PI
744 register controls the amount of indent.
747 You can nest indented sections as deeply as needed by
748 using multiple, nested pairs of
749 .B RS
751 .BR RE .
754 .SS Lists
757 .B IP
758 macro handles duties for all lists.
759 Its syntax is as follows:
762 .BI ".IP [" marker " [" width ]]
766 .I marker
767 is usually a bullet character
768 .B \[rs](bu
769 for unordered lists,
770 a number (or auto-incrementing number register) for numbered lists,
771 or a word or phrase for indented (glossary-style) lists.
775 .I width
776 specifies the indent for the body of each list item.
777 Once specified, the indent remains the same for all
778 list items in the document until specified again.
779 .\" -----
781 .ne 15
784 .SS "Tab stops"
786 Use the
787 .B ta
788 request to set tab stops as needed.
789 Use the
790 .B TA
791 macro to reset tabs to the default (every 5n).
792 You can redefine the
793 .B TA
794 macro to create a different set of default tab stops.
797 .SS "Displays and keeps"
799 Use displays to show text-based examples or figures
800 (such as code listings).
801 Displays turn off filling, so lines of code can be
802 displayed as-is without inserting
803 .B br
804 requests in between each line.
805 Displays can be 
806 .I kept
807 on a single page, or allowed to break across pages.
808 The following table shows the display types available.
810 .ne 11
813 cb   s s    s cbt s s
814 cb   s cb   s ^   s s
815 lfCW s lfCW s l   s s.
816 Display macro   Type of display
817 With keep       No keep
819 \&.DS L \&.LD   Left-justified.
820 \&.DS I [\fIindent\fP]  \&.ID   T{
821 Indented (default indent in the \fBDI\fP register).
823 \&.DS B \&.BD   T{
824 Block-centered (left-justified, longest line centered).
826 \&.DS C \&.CD   Centered.
827 \&.DS R \&.RD   Right-justified.
834 Use the
835 .B DE
836 macro to end any display type.
837 The macros
838 .B Ds
840 .B De
841 were formerly provided as aliases for
842 .B DS
844 .BR DE ,
845 respectively, but they have been removed, and should no longer be used.
846 X11 documents which actually use
847 .B Ds
849 .B De
850 always load a specific macro file from the X11 distribution (macros.t)
851 which provides proper definitions for the two macros.
854 .I keep
855 text together on a page,
856 such as
857 a paragraph that refers to a table (or list, or other item)
858 immediately following, use the
859 .B KS
861 .B KE
862 macros.
864 .B KS
865 macro begins a block of text to be kept on a single page,
866 and the
867 .B KE
868 macro ends the block.
871 You can specify a
872 .I "floating keep"
873 using the
874 .B KF
876 .B KE
877 macros.
878 If the keep cannot fit on the current page,
879 .I groff
880 holds the contents of the keep and allows text following
881 the keep (in the source file) to fill in the remainder of
882 the current page.
883 When the page breaks,
884 whether by an explicit
885 .B bp
886 request or by reaching the end of the page,
887 .I groff
888 prints the floating keep at the top of the new page.
889 This is useful for printing large graphics or tables
890 that do not need to appear exactly where specified.
893 The macros
894 .B B1
896 .B B2
897 can be used to enclose a text within a box;
898 .B .B1
899 begins the box, and
900 .B .B2
901 ends it.
902 Text in the box is automatically placed in a diversion
903 (keep).
906 .SS "Tables, figures, equations, and references"
909 .I -ms
910 macros support the standard
911 .I groff
912 preprocessors:
913 .IR tbl ,
914 .IR pic ,
915 .IR eqn ,
917 .IR refer .
918 Mark text meant for preprocessors by enclosing it
919 in pairs of tags as follows:
922 .BR ".TS [H]" " and " .TE
923 Denotes a table, to be processed by the
924 .I tbl
925 preprocessor.
926 The optional
927 .BR H "\~argument"
928 instructs
929 .I groff
930 to create a running header with the information
931 up to the
932 .B TH
933 macro.
934 .I Groff
935 prints the header at the beginning of the table;
936 if the table runs onto another page,
937 .I groff
938 prints the header on the next page as well.
941 .BR .PS " and " .PE
942 Denotes a graphic, to be processed by the
943 .I pic
944 preprocessor.
945 You can create a
946 .I pic
947 file by hand, using the
948 AT&T
949 .I pic
950 manual available on the Web as a reference,
951 or by using a graphics program such as
952 .IR xfig .
955 .BR ".EQ [\fI\,align\/\fP]" " and " .EN
956 Denotes an equation, to be processed by the
957 .I eqn
958 preprocessor.
959 The optional
960 .I align
961 argument can be
962 .BR C ,
963 .BR L ,
964 or\~\c
965 .B I
966 to center (the default), left-justify, or indent
967 the equation.
970 .BR .[ " and " .]
971 Denotes a reference, to be processed by the
972 .I refer
973 preprocessor.
974 The GNU
975 .IR @g@refer (@MAN1EXT@)
976 manual page provides a comprehensive reference
977 to the preprocessor and the format of the
978 bibliographic database.
981 .SS Footnotes
984 .I ms
985 macros provide a flexible footnote system.
986 You can specify a numbered footnote by using the
987 .B \[rs]**
988 escape, followed by the text of the footnote
989 enclosed by
990 .B FS
992 .B FE
993 macros.
996 You can specify symbolic footnotes
997 by placing the mark character (such as
998 .B \[rs](dg
999 for the dagger character) in the body text,
1000 followed by the text of the footnote
1001 enclosed by
1002 .B FS\ \[rs](dg
1004 .B FE
1005 macros.
1008 You can control how
1009 .I groff
1010 prints footnote numbers by changing the value of the
1011 .B FF
1012 register as follows:
1014 .ne 7
1018 Prints the footnote number as a superscript; indents the footnote (default).
1022 Prints the number followed by a period (like\~1.\&)
1023 and indents the footnote.
1027 Like\~1, without an indent.
1031 Like\~1, but prints the footnote number as a hanging paragraph.
1035 You can use footnotes safely within keeps and displays,
1036 but avoid using numbered footnotes within floating keeps.
1037 You can set a second
1038 .B \[rs]**
1039 between a
1040 .B \[rs]**
1041 and its corresponding
1042 .BR .FS ;
1043 as long as each
1044 .B .FS
1045 occurs
1046 .I after
1047 the corresponding
1048 .B \[rs]**
1049 and the occurrences of
1050 .B .FS
1051 are in the same order as the corresponding occurrences of
1052 .BR \[rs]** .
1055 .SS "Headers and footers"
1057 There are three ways to define headers and footers:
1059 .IP \(bu 3n
1060 Use the strings
1061 .BR LH ,
1062 .BR CH ,
1064 .B RH
1065 to set the left, center, and right headers; use
1066 .BR LF ,
1067 .BR CF ,
1069 .B RF
1070 to set the left, center, and right footers.
1071 This works best for documents that do not distinguish
1072 between odd and even pages.
1074 .IP \(bu
1075 Use the
1076 .B OH
1078 .B EH
1079 macros to define headers for the odd and even pages; and
1080 .B OF
1082 .B EF
1083 macros to define footers for the odd and even pages.
1084 This is more flexible than defining the individual strings.
1085 The syntax for these macros is as follows:
1089 .B ".OH '\fIleft\fP'\fIcenter\fP'\fIright\fP'"
1093 You can replace the quote (') marks with any character not
1094 appearing in the header or footer text.
1097 You can also redefine the
1098 .B PT
1100 .B BT
1101 macros to change the behavior of
1102 the header and footer, respectively.
1103 The header process also calls the (undefined)
1104 .B HD
1105 macro after
1106 .B PT ;
1107 you can define this macro if you need additional processing
1108 after printing the header
1109 (for example, to draw a line below the header).
1112 .SS Margins
1114 You control margins using a set of number registers.
1115 The following table lists the register names and defaults:
1117 .ne 8
1120 cb   s cb s s cb s cb s
1121 afCW s l  s s l  s l  s.
1122 Reg.    Definition      Effective       Default
1124 PO      T{
1125 Page offset (left margin)
1126 T}      next page       1i
1127 LL      T{
1128 Line length
1129 T}      next para.      6i
1130 LT      T{
1131 Header/footer length
1132 T}      next para.      6i
1133 HM      T{
1134 Top (header) margin
1135 T}      next page       1i
1136 FM      T{
1137 Bottom (footer) margin
1138 T}      next page       1i
1145 Note that there is no right margin setting.
1146 The combination of page offset and line length
1147 provide the information necessary to
1148 derive the right margin.
1151 .SS "Multiple columns"
1154 .I ms
1155 macros can set text in as many columns as will reasonably
1156 fit on the page.
1157 The following macros are available.
1158 All of them force a page break if a multi-column mode is already set.
1159 However, if the current mode is single-column, starting a multi-column
1160 mode does
1161 .I not
1162 force a page break.
1165 .B .1C
1166 Single-column mode.
1169 .B .2C
1170 Two-column mode.
1173 .BI ".MC [" width " [" gutter ]]
1174 Multi-column mode.
1175 If you specify no arguments, it is equivalent to the
1176 .B 2C
1177 macro.
1178 Otherwise,
1179 .I width
1180 is the width of each column and
1181 .I gutter
1182 is the space between columns.
1184 .B MINGW
1185 number register is the default gutter width.
1188 .SS "Creating a table of contents"
1190 Wrap text that you want to appear in the
1191 table of contents in
1192 .B XS
1194 .B XE
1195 macros.
1196 Use the
1197 .B TC
1198 macro to print the table of contents at the end of the document,
1199 resetting the page number to\~\c
1200 .B i
1201 (Roman numeral\~1).
1204 You can manually create a table of contents
1205 by specifying a page number as the first argument to
1206 .BR XS .
1207 Add subsequent entries using the
1208 .B XA
1209 macro.
1210 For example:
1214 .ne 8
1216 \&.XS 1
1217 Introduction
1218 \&.XA 2
1219 A Brief History of the Universe
1220 \&.XA 729
1221 Details of Galactic Formation
1222 \&.\|.\|.
1223 \&.XE
1225 .RE  
1227 .LP  
1228 Use the
1229 .B PX  
1230 macro to print a manually-generated table of contents
1231 without resetting the page number.
1234 If you give the argument
1235 .B no
1236 to either
1237 .B PX
1238 or   
1239 .BR TC ,
1240 .I groff
1241 suppresses printing the title
1242 specified by the
1243 .B \[rs]*[TOC]  
1244 string.
1247 .SS "Fractional point sizes"
1249 Traditionally, the
1250 .I ms
1251 macros only support integer values for the document's font size and
1252 vertical spacing.
1253 To overcome this restriction, values larger than or equal to 1000 are taken
1254 as fractional values, multiplied by 1000.
1255 For example, `.nr\~PS\~10250' sets the font size to 10.25 points.
1258 The following four registers accept fractional point sizes:
1259 .BR PS ,
1260 .BR VS ,
1261 .BR FPS ,
1263 .BR FVS .
1266 Due to backwards compatibility, the value of
1267 .B VS
1268 must be smaller than 40000 (this is 40.0 points).
1272 .SH "DIFFERENCES FROM troff ms"
1275 .I "groff ms"
1276 macros are a complete re-implementation,
1277 using no original AT&T code.
1278 Since they take advantage of the extended features in
1279 .IR groff ,
1280 they cannot be used with AT&T
1281 .IR troff .
1282 Other differences include:
1284 .IP \(bu 3n
1285 The internals of
1286 .I "groff ms"
1287 differ from the internals of Unix
1288 .IR ms . 
1289 Documents that depend upon implementation details of Unix
1290 .I ms
1291 may not format properly with
1292 .IR "groff ms" .
1294 .IP \(bu
1295 The error-handling policy of
1296 .I "groff ms"
1297 is to detect and report errors,
1298 rather than silently to ignore them.
1300 .IP \(bu
1301 Bell Labs localisms are not implemented.
1303 .IP \(bu
1304 Berkeley localisms, in particular the
1305 .B TM
1307 .B CT
1308 macros,
1309 are not implemented.
1311 .IP \(bu
1312 .I "Groff ms"
1313 does not work in compatibility mode (e.g., with the
1314 .B \-C
1315 option).
1317 .IP \(bu
1318 There is no support for typewriter-like devices.
1320 .IP \(bu
1321 .I "Groff ms"
1322 does not provide cut marks.
1324 .IP \(bu
1325 Multiple line spacing is not supported
1326 (use a larger vertical spacing instead).
1328 .IP \(bu
1329 Some Unix
1330 .I ms
1331 documentation says that the
1332 .B CW
1334 .B GW
1335 number registers can be used to control the column width and
1336 gutter width, respectively.
1337 These number registers are not used in
1338 .IR "groff ms" .
1340 .IP \(bu
1341 Macros that cause a reset
1342 (paragraphs, headings, etc.\&)
1343 may change the indent.
1344 Macros that change the indent do not increment or decrement
1345 the indent, but rather set it absolutely.
1346 This can cause problems for documents that define
1347 additional macros of their own.
1348 The solution is to use not the
1349 .B in
1350 request but instead the
1351 .B RS
1353 .B RE
1354 macros.
1356 .IP \(bu
1357 The number register
1358 .B GS
1359 is set to\~1 by the
1360 .I "groff ms"
1361 macros,
1362 but is not used by the Unix
1363 .I ms
1364 macros.
1365 Documents that need to determine whether
1366 they are being formatted with Unix
1367 .I ms
1369 .I "groff ms"
1370 should use this number register.
1372 .IP \(bu
1373 To make
1374 .I "groff ms"
1375 use the default page offset (which also specifies the left margin),
1377 .B PO
1378 number register must stay undefined until the first
1379 .B ms
1380 macro is evaluated.
1381 This implies that
1382 .B PO
1383 should not be used early in the document, unless it is changed also:
1384 Remember that accessing an undefined register automatically defines it.
1386 .ne 23
1389 .SS Strings
1391 You can redefine the following strings to adapt the
1392 .I "groff ms"
1393 macros to languages other than English:
1395 center;
1396 cb cb
1397 afCW l .
1398 String  Default Value
1400 REFERENCES      References
1401 ABSTRACT        ABSTRACT
1402 TOC     Table of Contents
1403 MONTH1  January
1404 MONTH2  February
1405 MONTH3  March
1406 MONTH4  April
1407 MONTH5  May
1408 MONTH6  June
1409 MONTH7  July
1410 MONTH8  August
1411 MONTH9  September
1412 MONTH10 October
1413 MONTH11 November
1414 MONTH12 December
1420 .B \[rs]*-
1421 string produces an em dash \[em] like this.
1425 .B \[rs]*Q
1427 .B \[rs]*U
1428 to get a left and right typographer's quote,
1429 respectively, in
1430 .I troff
1431 (and plain quotes in
1432 .IR nroff ).
1436 .SS Text Settings
1439 .B FAM
1440 string sets the default font family.
1441 If this string is undefined at initialization,
1442 it is set to Times.
1445 The point size, vertical spacing, and inter-paragraph spacing for footnotes
1446 are controlled by the number registers
1447 .BR FPS ,
1448 .BR FVS ,
1450 .BR FPD ;
1451 at initialization these are set to
1452 .BR \[rs]n(PS-2 ,
1453 .BR \[rs]n[FPS]+2 ,
1455 .BR \[rs]n(PD/2 ,
1456 respectively.
1457 If any of these registers are defined before initialization,
1458 the initialization macro does not change them.
1461 The hyphenation flags (as set by the
1462 .B hy
1463 request) are set from the
1464 .B HY
1465 register;
1466 the default is\~14.
1469 Improved accent marks
1470 (as originally defined in Berkeley's
1471 .I ms
1472 version)
1473 are available by specifying the
1474 .B AM
1475 macro at the beginning of your document.
1476 You can place an accent over most characters
1477 by specifying the string defining the accent
1478 directly after the character.
1479 For example,
1480 .B n\[rs]*~ 
1481 produces an n with a tilde over it.
1485 .SH "NAMING CONVENTIONS"
1489 The following conventions are used for names of macros, strings and
1490 number registers.
1491 External names available to documents that use the
1492 .I "groff ms"
1493 macros contain only uppercase letters and digits.
1496 Internally the macros are divided into modules;
1497 naming conventions are as follows:
1499 .IP \(bu 3n
1500 Names used only within one module are of the form
1501 .IB \%module * name\fR.
1503 .IP \(bu
1504 Names used outside the module in which they are defined are of the form
1505 .IB \%module @ name\fR.
1507 .IP \(bu
1508 Names associated with a particular environment are of the form
1509 .IB \%environment : name\fR;
1510 these are used only within the
1511 .B par
1512 module.
1514 .IP \(bu
1515 .I name
1516 does not have a module prefix.
1518 .IP \(bu
1519 Constructed names used to implement arrays are of the form
1520 .IB \%array ! index\fR.
1523 Thus the groff ms macros reserve the following names:
1525 .IP \(bu 3n
1526 Names containing the characters
1527 .BR * ,
1528 .BR @ ,
1529 and\~\c
1530 .BR : .
1532 .IP \(bu
1533 Names containing only uppercase letters and digits.
1537 .SH FILES
1539 .B @MACRODIR@/ms.tmac
1540 (a wrapper file for
1541 .BR s.tmac )
1543 .B @MACRODIR@/s.tmac
1547 .SH "SEE ALSO"
1549 .BR groff (@MAN1EXT@),
1550 .BR @g@troff (@MAN1EXT@),
1551 .BR @g@tbl (@MAN1EXT@),
1552 .BR @g@pic (@MAN1EXT@),
1553 .BR @g@eqn (@MAN1EXT@),
1554 .BR @g@refer (@MAN1EXT@),
1555 .I Groff: The GNU Implementation of troff
1556 by Trent Fisher and Werner Lemberg.
1560 .SH AUTHOR
1562 Original manual page by James Clark
1563 .IR "et al" ;
1564 rewritten by Larry Kollar
1565 (\fIlkollar@despammed.com\fR).
1567 .cp \n[groff_ms_C]
1569 .\" Local Variables:
1570 .\" mode: nroff
1571 .\" End: