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