Sync-to-go: update copyright for 2015
[s-roff.git] / man / tmac-ms.7.in
blob6a4e0c457349ebefca4cf5783b7dc99eec0b5b32
1 '\" t -- preprocess: tbl(1)
2 .ig
3 @ @L_ROFF@_ms.7
5 Copyright (c) 2014 - 2015 Steffen (Daode) Nurpmeso <sdaoden@users.sf.net>.
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 MINGW   Minimum width between columns   next page       2n
256 .SS "Cover page macros"
258 Use the following macros to create a cover page for your document
259 in the order shown.
262 .B .RP [no]
263 Specifies the report format for your document.
264 The report format creates a separate cover page.
265 With no
266 .B RP
267 macro,
268 .I @L_ROFF@
269 prints a subset of the
270 cover page on page\~1 of your document.
273 If you use the optional
274 .B no
275 argument,
276 .I groff
277 prints a title page but
278 does not repeat any of the title page information
279 (title, author, abstract, etc.\&)
280 on page\~1 of the document.
283 .B .P1
284 (P-one) Prints the header on page\~1.
285 The default is to suppress the header.
288 .BI ".DA [" xxx ]
289 (optional) Print the current date,
290 or the arguments to the macro if any,
291 on the title page (if specified)
292 and in the footers.
293 This is the default for
294 .IR nroff .
297 .BI ".ND [" xxx ]
298 (optional) Print the current date,
299 or the arguments to the macro if any,
300 on the title page (if specified)
301 but not in the footers.
302 This is the default for
303 .IR @L_TROFF@ .
306 .B .TL
307 Specifies the document title.
308 .I @T_ROFF@
309 collects text following the
310 .B TL
311 macro into the title, until reaching the author name or abstract.
314 .B .AU
315 Specifies the author's name.
316 You can specify multiple authors by using an
317 .B AU
318 macro for each author.
321 .B .AI
322 Specifies the author's institution.
323 You can specify multiple institutions.
326 .B .AB [no]
327 Begins the abstract.
328 The default is to print the word
329 .BR ABSTRACT ,
330 centered and in italics, above the text of the abstract.
331 The option
332 .B no
333 suppresses this heading.
336 .B .AE
337 End the abstract.
340 .SS Paragraphs
342 Use the
343 .B PP
344 macro to create indented paragraphs,
345 and the
346 .B LP
347 macro to create paragraphs with no initial indent.
351 .B QP
352 macro indents all text at both left and right margins.
353 The next paragraph or heading
354 returns margins to normal.
358 .B XP
359 macro produces an exdented paragraph.
360 The first line of the paragraph begins at
361 the left margin,
362 and subsequent lines are indented
363 (the opposite of
364 .BR PP ).
367 For each of the above paragraph types,
368 and also for any list entry introduced by the
369 .B IP
370 macro
371 (described later),
372 the document control register
373 .BR PORPHANS ,
374 sets the
375 .I minimum
376 number of lines which must be printed,
377 after the start of the paragraph,
378 and before any page break occurs.
379 If there is insufficient space remaining on the current page
380 to accommodate this number of lines,
381 then a page break is forced
382 .I before
383 the first line of the paragraph is printed.
386 Similarly,
387 when a section heading
388 (see subsection
389 .I Headings
390 below)
391 preceeds any of these paragraph types,
393 .B HORPHANS
394 document control register specifies the
395 .I minimum
396 number of lines of the paragraph
397 which must be kept on the same page as the heading.
398 If insufficient space remains on the current page
399 to accommodate the heading and this number of lines of paragraph text,
400 then a page break is forced
401 .I before
402 the heading is printed.
405 .SS Headings
407 Use headings to create a hierarchical structure
408 for your document.
409 By default,
411 .I ms
412 macros print headings in
413 .B bold
414 using the same font family and point size as the body text.
415 For output devices which support scalable fonts,
416 this behaviour may be modified,
417 by defining the document control registers,
418 .B GROWPS
420 .BR PSINCR .
423 The following heading macros are available:
426 .BI .NH\  xx
427 Numbered heading.
428 The argument
429 .I xx
430 is either a numeric argument to indicate the
431 level of the heading, or
432 .I S\ xx\ xx\ \c
433 ".\|.\|."
434 to set the section number explicitly.
435 If you specify heading levels out of sequence,
436 such as invoking
437 .B ".NH\ 3"
438 after
439 .BR ".NH\ 1" ,
440 a warning on standard error is produced.
443 If the
444 .B GROWPS
445 register is set to a value
446 greater than the level of the heading,
447 then the point size of the heading will be increased by
448 .B PSINCR
449 units over the text size specified by the
450 .B PS
451 register,
452 for each level by which the heading level is less than
453 the value of
454 .BR GROWPS .
455 For example,
456 the sequence:
459 .ne 12
462 \&.nr PS 10
463 \&.nr GROWPS 3
464 \&.nr PSINCR 1.5p
466 \&.NH 1
467 Top Level Heading
469 \&.NH 2
470 Second Level Heading
472 \&.NH 3
473 Third Level Heading
478 will cause
479 .RI \*(lq 1.\ Top\ Level\ Heading \*(rq
480 to be printed in 13pt
481 .B bold
482 text, followed by
483 .RI \*(lq 1.1.\ Second\ Level\ Heading \*(rq
484 in 11.5pt
485 .B bold
486 text, while
487 .RI \*(lq 1.1.1.\ Third\ Level\ Heading \*(rq,
488 and all more deeply nested heading levels,
489 will remain in the 10pt
490 .B bold
491 text which is specified by the
492 .B PS
493 register.
496 Note that the value stored in
497 .B PSINCR
498 is interpreted in
499 .I groff
500 basic units;
502 .I p
503 scaling factor should be employed,
504 when assigning a value specified in points.
507 The style used to represent the section number,
508 within a numbered heading,
509 is controlled by the
510 .B SN-STYLE
511 string;
512 this may be set to either the
513 .B SN-DOT
514 or the
515 .B SN-NO-DOT
516 style,
517 (described below),
518 by aliasing
519 .B SN-STYLE
520 accordingly.
521 By default,
522 .B SN-STYLE
523 is initialised by defining the alias
527 \&.als SN-STYLE SN-DOT
531 it may be changed to the
532 .B SN-NO-DOT
533 style,
534 if preferred,
535 by defining the alternative alias
539 \&.als SN-STYLE SN-NO-DOT
543 Any such change becomes effective with the first use of
544 .BR .NH ,
545 .I after
546 the new alias is defined.
549 After invoking
550 .BR .NH ,
551 the assigned heading number is available in the strings
552 .B SN-DOT
553 (as it appears in the default formatting style for numbered headings,
554 with a terminating period following the number),
556 .B SN-NO-DOT
557 (with this terminating period omitted).
558 The string
559 .B SN
560 is also defined,
561 as an alias for
562 .BR SN-DOT ;
563 if preferred,
564 the user may redefine it as an alias for
565 .BR SN-NO-DOT ,
566 'ne 10
567 by including the initialisation:
572 \&.als SN SN-NO-DOT
577 at any time;
578 the change becomes effective with the next use of
579 .BR .NH ,
580 .I after
581 the new alias is defined.
584 .BI .SH\ [ xx ]
585 Unnumbered subheading.
586 The use of the optional
587 .I xx
588 argument is a GNU extension,
589 which adjusts the point size of the unnumbered subheading
590 to match that of a numbered heading,
591 introduced using
592 .BI .NH\  xx
593 with the same value of
594 .IR xx .
595 For example,
596 given the same settings for
597 .BR PS ,
598 .B GROWPS
600 .BR PSINCR ,
601 as used in the preceeding
602 .B .NH
603 example,
604 the sequence:
610 \&.SH 2
611 An Unnumbered Subheading
616 will print
617 .RI \*(lq "An Unnumbered Subheading" \*(rq
618 in 11.5pt
619 .B bold
620 text.
623 .SS Highlighting
626 .I ms
627 macros provide a variety of methods to highlight
628 or emphasize text:
631 .B ".B [\fItxt\fP [\fIpost\fP [\fIpre\fP]]]"
632 Sets its first argument in
633 .BR "bold type" .
634 If you specify a second argument,
635 it is printed in the previous font after
636 the bold text, with no intervening space
637 (this allows you to set punctuation after
638 the highlighted text without highlighting
639 the punctuation).
640 Similarly, it prints the third argument (if any)
641 in the previous font
642 .B before
643 the first argument.
644 For example,
648 \&.B foo ) (
652 prints
653 .RB ( foo ).
656 If you give this macro no arguments,
657 all the following text is printed in bold until
658 the next highlighting, paragraph, or heading macro.
661 .B ".R [\fItxt\fP [\fIpost\fP [\fIpre\fP]]]"
662 Sets its first argument in
663 roman (or regular) type.
664 It operates similarly to the
665 .B B
666 macro otherwise.
669 .B ".I [\fItxt\fP [\fIpost\fP [\fIpre\fP]]]"
670 Sets its first argument in
671 .IR "italic type" .
672 It operates similarly to the
673 .B B
674 macro otherwise.
677 .B ".CW [\fItxt\fP [\fIpost\fP [\fIpre\fP]]]"
678 Sets its first argument in a constant width face.
679 It operates similarly to the
680 .B B
681 macro otherwise.
684 .B ".BI [\fItxt\fP [\fIpost\fP [\fIpre\fP]]]"
685 Sets its first argument in bold italic type.
686 It operates similarly to the
687 .B B
688 macro otherwise.
691 .BI ".BX [" txt ]
692 Prints its argument and draws a box around it.
693 If you want to box a string that contains spaces,
694 use a digit-width space (\[rs]0).
697 .BI ".UL [" txt " [" post ]]
698 Prints its first argument with an underline.
699 If you specify a second argument,
700 it is printed in the previous font after
701 the underlined text, with no intervening space.
704 .B .LG
705 Prints all text following in larger type
706 (2\~points larger than the current point size) until
707 the next font size, highlighting, paragraph, or heading macro.
708 You can specify this macro multiple times
709 to enlarge the point size as needed.
712 .B .SM
713 Prints all text following in
714 smaller type
715 (2\~points smaller than the current point size) until
716 the next type size, highlighting, paragraph, or heading macro.
717 You can specify this macro multiple times
718 to reduce the point size as needed.
721 .B .NL
722 Prints all text following in
723 the normal point size
724 (that is, the value of the
725 .B PS
726 register).
729 .BI \[rs]*{ text \[rs]*}
730 Print the enclosed
731 .I text
732 as a superscript.
735 .SS Indents
737 You may need to indent sections of text.
738 A typical use for indents is to create nested lists and sublists.
741 Use the
742 .B RS
744 .B RE
745 macros to start and end a section of indented text, respectively.
747 .B PI
748 register controls the amount of indent.
751 You can nest indented sections as deeply as needed by
752 using multiple, nested pairs of
753 .B RS
755 .BR RE .
758 .SS Lists
761 .B IP
762 macro handles duties for all lists.
763 Its syntax is as follows:
766 .BI ".IP [" marker " [" width ]]
770 .I marker
771 is usually a bullet character
772 .B \[rs](bu
773 for unordered lists,
774 a number (or auto-incrementing number register) for numbered lists,
775 or a word or phrase for indented (glossary-style) lists.
779 .I width
780 specifies the indent for the body of each list item.
781 Once specified, the indent remains the same for all
782 list items in the document until specified again.
783 .\" -----
785 .ne 15
788 .SS "Tab stops"
790 Use the
791 .B ta
792 request to set tab stops as needed.
793 Use the
794 .B TA
795 macro to reset tabs to the default (every 5n).
796 You can redefine the
797 .B TA
798 macro to create a different set of default tab stops.
801 .SS "Displays and keeps"
803 Use displays to show text-based examples or figures
804 (such as code listings).
805 Displays turn off filling, so lines of code can be
806 displayed as-is without inserting
807 .B br
808 requests in between each line.
809 Displays can be
810 .I kept
811 on a single page, or allowed to break across pages.
812 The following table shows the display types available.
814 .ne 11
817 cb   s    cbt
818 cb   cb   ^
819 lfCW lfCW lx.
820 Display macro   Type of display
821 With keep       No keep
823 \&.DS L \&.LD   Left-justified.
824 \&.DS I [\fIindent\fP]  \&.ID   T{
825 Indented (default indent in the \fBDI\fP register).
827 \&.DS B \&.BD   T{
828 Block-centered (left-justified, longest line centered).
830 \&.DS C \&.CD   Centered.
831 \&.DS R \&.RD   Right-justified.
838 Use the
839 .B DE
840 macro to end any display type.
841 The macros
842 .B Ds
844 .B De
845 were formerly provided as aliases for
846 .B DS
848 .BR DE ,
849 respectively, but they have been removed, and should no longer be used.
850 X11 documents which actually use
851 .B Ds
853 .B De
854 always load a specific macro file from the X11 distribution (macros.t)
855 which provides proper definitions for the two macros.
858 .I keep
859 text together on a page,
860 such as
861 a paragraph that refers to a table (or list, or other item)
862 immediately following, use the
863 .B KS
865 .B KE
866 macros.
868 .B KS
869 macro begins a block of text to be kept on a single page,
870 and the
871 .B KE
872 macro ends the block.
875 You can specify a
876 .I "floating keep"
877 using the
878 .B KF
880 .B KE
881 macros.
882 If the keep cannot fit on the current page,
883 .I groff
884 holds the contents of the keep and allows text following
885 the keep (in the source file) to fill in the remainder of
886 the current page.
887 When the page breaks,
888 whether by an explicit
889 .B bp
890 request or by reaching the end of the page,
891 the floating keep is printed at the top of the new page.
892 This is useful for printing large graphics or tables
893 that do not need to appear exactly where specified.
896 The macros
897 .B B1
899 .B B2
900 can be used to enclose a text within a box;
901 .B .B1
902 begins the box, and
903 .B .B2
904 ends it.
905 Text in the box is automatically placed in a diversion
906 (keep).
909 .SS "Tables, figures, equations, and references"
912 .I -ms
913 macros support the standard
914 preprocessors:
915 .IR @L_P_TBL@ ,
916 .IR @L_P_PIC@ ,
917 .IR @L_P_EQN@ ,
919 .IR @L_P_REFER@ .
920 Mark text meant for preprocessors by enclosing it
921 in pairs of tags as follows:
924 .BR ".TS [H]" " and " .TE
925 Denotes a table, to be processed by the
926 .I @L_P_TBL@
927 preprocessor.
928 The optional
929 .BR H "\~argument"
930 instructs to create a running header with the information up to the
931 .B TH
932 macro.
933 The header is printed at the beginning of the table;
934 if the table runs onto another page,
935 the header is printed on the next page as well.
938 .BR .PS " and " .PE
939 Denotes a graphic, to be processed by the
940 .I @L_P_PIC@
941 preprocessor.
942 You can create a
943 .I @L_P_PIC@
944 file by hand, using the
945 AT&T
946 .I pic
947 manual available on the Web as a reference,
948 or by using a graphics program such as
949 .IR xfig .
952 .BR ".EQ [\fI\,align\/\fP]" " and " .EN
953 Denotes an equation, to be processed by the
954 .I @L_P_EQN@
955 preprocessor.
956 The optional
957 .I align
958 argument can be
959 .BR C ,
960 .BR L ,
961 or\~\c
962 .B I
963 to center (the default), left-justify, or indent
964 the equation.
967 .BR .[ " and " .]
968 Denotes a reference, to be processed by the
969 .I @L_P_REFER@
970 preprocessor.
972 .IR @L_P_REFER@ (@MAN1EXT@)
973 manual page provides a comprehensive reference
974 to the preprocessor and the format of the
975 bibliographic database.
978 .SS Footnotes
981 .I ms
982 macros provide a flexible footnote system.
983 You can specify a numbered footnote by using the
984 .B \[rs]**
985 escape, followed by the text of the footnote
986 enclosed by
987 .B FS
989 .B FE
990 macros.
993 You can specify symbolic footnotes
994 by placing the mark character (such as
995 .B \[rs](dg
996 for the dagger character) in the body text,
997 followed by the text of the footnote
998 enclosed by
999 .B FS\ \[rs](dg
1001 .B FE
1002 macros.
1005 You can control how footnote numbers are printed by changing the value
1006 of the
1007 .B FF
1008 register as follows:
1010 .ne 7
1014 Prints the footnote number as a superscript; indents the footnote (default).
1018 Prints the number followed by a period (like\~1.\&)
1019 and indents the footnote.
1023 Like\~1, without an indent.
1027 Like\~1, but prints the footnote number as a hanging paragraph.
1031 You can use footnotes safely within keeps and displays,
1032 but avoid using numbered footnotes within floating keeps.
1033 You can set a second
1034 .B \[rs]**
1035 between a
1036 .B \[rs]**
1037 and its corresponding
1038 .BR .FS ;
1039 as long as each
1040 .B .FS
1041 occurs
1042 .I after
1043 the corresponding
1044 .B \[rs]**
1045 and the occurrences of
1046 .B .FS
1047 are in the same order as the corresponding occurrences of
1048 .BR \[rs]** .
1051 .SS "Headers and footers"
1053 There are three ways to define headers and footers:
1055 .IP \(bu 3n
1056 Use the strings
1057 .BR LH ,
1058 .BR CH ,
1060 .B RH
1061 to set the left, center, and right headers; use
1062 .BR LF ,
1063 .BR CF ,
1065 .B RF
1066 to set the left, center, and right footers.
1067 This works best for documents that do not distinguish
1068 between odd and even pages.
1070 .IP \(bu
1071 Use the
1072 .B OH
1074 .B EH
1075 macros to define headers for the odd and even pages; and
1076 .B OF
1078 .B EF
1079 macros to define footers for the odd and even pages.
1080 This is more flexible than defining the individual strings.
1081 The syntax for these macros is as follows:
1085 .B ".OH '\fIleft\fP'\fIcenter\fP'\fIright\fP'"
1089 You can replace the quote (') marks with any character not
1090 appearing in the header or footer text.
1093 You can also redefine the
1094 .B PT
1096 .B BT
1097 macros to change the behavior of
1098 the header and footer, respectively.
1099 The header process also calls the (undefined)
1100 .B HD
1101 macro after
1102 .B PT ;
1103 you can define this macro if you need additional processing
1104 after printing the header
1105 (for example, to draw a line below the header).
1108 .SS Margins
1110 You control margins using a set of number registers.
1111 The following table lists the register names and defaults:
1113 .ne 8
1116 cb   cb cb cb
1117 lfCW l  l  l.
1118 Reg.    Definition      Effective       Default
1120 PO      Page offset (left margin)       next page       1i
1121 LL      Line length     next paragraph  6i
1122 LT      Header/footer length    next paragraph  6i
1123 HM      Top (header) margin     next page       1i
1124 FM      Bottom (footer) margin  next page       1i
1131 Note that there is no right margin setting.
1132 The combination of page offset and line length
1133 provide the information necessary to
1134 derive the right margin.
1137 .SS "Multiple columns"
1140 .I ms
1141 macros can set text in as many columns as will reasonably
1142 fit on the page.
1143 The following macros are available.
1144 All of them force a page break if a multi-column mode is already set.
1145 However, if the current mode is single-column, starting a multi-column
1146 mode does
1147 .I not
1148 force a page break.
1151 .B .1C
1152 Single-column mode.
1155 .B .2C
1156 Two-column mode.
1159 .BI ".MC [" width " [" gutter ]]
1160 Multi-column mode.
1161 If you specify no arguments, it is equivalent to the
1162 .B 2C
1163 macro.
1164 Otherwise,
1165 .I width
1166 is the width of each column and
1167 .I gutter
1168 is the space between columns.
1170 .B MINGW
1171 number register is the default gutter width.
1174 .SS "Creating a table of contents"
1176 Wrap text that you want to appear in the
1177 table of contents in
1178 .B XS
1180 .B XE
1181 macros.
1182 Use the
1183 .B TC
1184 macro to print the table of contents at the end of the document,
1185 resetting the page number to\~\c
1186 .B i
1187 (Roman numeral\~1).
1190 You can manually create a table of contents
1191 by specifying a page number as the first argument to
1192 .BR XS .
1193 Add subsequent entries using the
1194 .B XA
1195 macro.
1196 For example:
1200 .ne 8
1202 \&.XS 1
1203 Introduction
1204 \&.XA 2
1205 A Brief History of the Universe
1206 \&.XA 729
1207 Details of Galactic Formation
1208 \&.\|.\|.
1209 \&.XE
1214 Use the
1215 .B PX
1216 macro to print a manually-generated table of contents
1217 without resetting the page number.
1220 If you give the argument
1221 .B no
1222 to either
1223 .B PX
1225 .BR TC ,
1226 printing of the title specified by the
1227 .B \[rs]*[TOC]
1228 string is suppressed.
1231 .SS "Fractional point sizes"
1233 Traditionally, the
1234 .I ms
1235 macros only support integer values for the document's font size and
1236 vertical spacing.
1237 To overcome this restriction, values larger than or equal to 1000 are taken
1238 as fractional values, multiplied by 1000.
1239 For example, `.nr\~PS\~10250' sets the font size to 10.25 points.
1242 The following four registers accept fractional point sizes:
1243 .BR PS ,
1244 .BR VS ,
1245 .BR FPS ,
1247 .BR FVS .
1250 Due to backwards compatibility, the value of
1251 .B VS
1252 must be smaller than 40000 (this is 40.0 points).
1255 .SH "DIFFERENCES FROM troff ms"
1258 .I "@T_ROFF@ ms"
1259 macros are a complete re-implementation,
1260 using no original AT&T code.
1261 Since they take advantage of the extended features in
1262 .IR @T_ROFF@ ,
1263 they cannot be used with AT&T
1264 .IR troff .
1265 Other differences include:
1267 .IP \(bu 3n
1268 The internals of
1269 .I "@T_ROFF@ ms"
1270 differ from the internals of Unix
1271 .IR ms .
1272 Documents that depend upon implementation details of Unix
1273 .I ms
1274 may not format properly with
1275 .IR "@T_ROFF@ ms" .
1277 .IP \(bu
1278 The error-handling policy of
1279 .I "@T_ROFF@ ms"
1280 is to detect and report errors,
1281 rather than silently to ignore them.
1283 .IP \(bu
1284 Some Bell Labs localisms are not implemented by default.
1285 However, if you call the otherwise undocumented
1286 .BR SC
1287 section-header macro, you will enable implementations of three other
1288 archaic Bell Labs macros:
1289 .BR UC ,
1290 .BR P1 ,
1292 .BR P2 .
1293 These are not enabled by default because (a)\~they were not documented,
1294 in the original
1295 .IR "ms manual" ,
1296 and (b)\~the
1297 .B P1
1299 .B UC
1300 macros both collide with different macros in the Berkeley version of
1301 .IR ms .
1304 These emulations are sufficient to give back the 1976 Kernighan\~& Cherry
1305 paper
1306 .I "Typsetting Mathematics \(en User's Guide"
1307 its section headings, and restore some text that had gone missing as
1308 arguments of undefined macros.
1309 No warranty express or implied is given as to how well the typographic
1310 details these produce match the original Bell Labs macros.
1312 .IP \(bu
1313 Berkeley localisms, in particular the
1314 .B TM
1316 .B CT
1317 macros,
1318 are not implemented.
1320 .IP \(bu
1321 .I "@T_ROFF@ ms"
1322 does not work in compatibility mode (e.g., with the
1323 .B \-C
1324 option).
1326 .IP \(bu
1327 There is no support for typewriter-like devices.
1329 .IP \(bu
1330 .I "@T_ROFF@ ms"
1331 does not provide cut marks.
1333 .IP \(bu
1334 Multiple line spacing is not supported
1335 (use a larger vertical spacing instead).
1337 .IP \(bu
1338 Some Unix
1339 .I ms
1340 documentation says that the
1341 .B CW
1343 .B GW
1344 number registers can be used to control the column width and
1345 gutter width, respectively.
1346 These number registers are not used in
1347 .IR "@T_ROFF@ ms" .
1349 .IP \(bu
1350 Macros that cause a reset
1351 (paragraphs, headings, etc.\&)
1352 may change the indent.
1353 Macros that change the indent do not increment or decrement
1354 the indent, but rather set it absolutely.
1355 This can cause problems for documents that define
1356 additional macros of their own.
1357 The solution is to use not the
1358 .B in
1359 request but instead the
1360 .B RS
1362 .B RE
1363 macros.
1365 .IP \(bu
1366 The number register
1367 .B GS
1368 is set to\~1 by the
1369 .I "@T_ROFF@ ms"
1370 macros,
1371 but is not used by the Unix
1372 .I ms
1373 macros.
1374 Documents that need to determine whether
1375 they are being formatted with Unix
1376 .I ms
1378 .I "@T_ROFF@ ms"
1379 should use this number register.
1381 .IP \(bu
1382 To make
1383 .I "@T_ROFF@ ms"
1384 use the default page offset (which also specifies the left margin),
1386 .B PO
1387 number register must stay undefined until the first
1388 .B ms
1389 macro is evaluated.
1390 This implies that
1391 .B PO
1392 should not be used early in the document, unless it is changed also:
1393 Remember that accessing an undefined register automatically defines it.
1395 .ne 23
1398 .SS Strings
1400 You can redefine the following strings to adapt the
1401 .I "@T_ROFF@ ms"
1402 macros to languages other than English:
1404 center;
1405 cb   cb
1406 lfCW l.
1407 String  Default Value
1409 REFERENCES      References
1410 ABSTRACT        ABSTRACT
1411 TOC     Table of Contents
1412 MONTH1  January
1413 MONTH2  February
1414 MONTH3  March
1415 MONTH4  April
1416 MONTH5  May
1417 MONTH6  June
1418 MONTH7  July
1419 MONTH8  August
1420 MONTH9  September
1421 MONTH10 October
1422 MONTH11 November
1423 MONTH12 December
1429 .B \[rs]*-
1430 string produces an em dash \[em] like this.
1434 .B \[rs]*Q
1436 .B \[rs]*U
1437 to get a left and right typographer's quote,
1438 respectively, in
1439 .I troff
1440 (and plain quotes in
1441 .IR nroff ).
1444 .SS Text Settings
1447 .B FAM
1448 string sets the default font family.
1449 If this string is undefined at initialization,
1450 it is set to Times.
1453 The point size, vertical spacing, and inter-paragraph spacing for footnotes
1454 are controlled by the number registers
1455 .BR FPS ,
1456 .BR FVS ,
1458 .BR FPD ;
1459 at initialization these are set to
1460 .BR \[rs]n(PS-2 ,
1461 .BR \[rs]n[FPS]+2 ,
1463 .BR \[rs]n(PD/2 ,
1464 respectively.
1465 If any of these registers are defined before initialization,
1466 the initialization macro does not change them.
1469 The hyphenation flags (as set by the
1470 .B hy
1471 request) are set from the
1472 .B HY
1473 register;
1474 the default is\~14.
1477 Improved accent marks
1478 (as originally defined in Berkeley's
1479 .I ms
1480 version)
1481 are available by specifying the
1482 .B AM
1483 macro at the beginning of your document.
1484 You can place an accent over most characters
1485 by specifying the string defining the accent
1486 directly after the character.
1487 For example,
1488 .B n\[rs]*~
1489 produces an n with a tilde over it.
1492 .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 .SH "SEE ALSO"
1553 .BR @L_ROFF@ (@MAN1EXT@),
1554 .BR @L_TROFF@ (@MAN1EXT@),
1555 .BR @L_P_TBL@ (@MAN1EXT@),
1556 .BR @L_P_PIC@ (@MAN1EXT@),
1557 .BR @L_P_EQN@ (@MAN1EXT@),
1558 .BR @L_P_REFER@ (@MAN1EXT@),
1559 .I Groff: The GNU Implementation of troff
1560 by Trent Fisher and Werner Lemberg.
1563 .SH AUTHOR
1565 Original manual page by James Clark
1566 .IR "et al" ;
1567 rewritten by Larry Kollar
1568 (\fIlkollar@despammed.com\fR).
1570 .cp \n[groff_ms_C]
1572 .\" s-ts-mode