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