NAME
groffms - groff ms macros
SYNOPSIS
ggrrooffff -mmss [ options... ] [ files... ]
ggrrooffff -mm mmss [ options... ] [ files... ]
DESCRIPTION
This manual page describes the GNU version of the ms macros, part of the groff typesetting system. The ms macros are mostly compatible with the documented behavior of the 4.3 BSD Unix ms macros (see Differences from troff ms below for details). The ms macros are suitable for reports, letters, books, and technical documentation. UUSSAAGGEEThe ms macro package expects files to have a certain amount of struc-
ture. The simplest documents can begin with a paragraph macro and con-
sist of text separated by paragraph macros or even blank lines. Longer documents have a structure as follows: DDooccuummeenntt ttyyppeeIf you use the RRPP (report) macro at the beginning of the docu-
ment, groff prints the cover page information on its own page; otherwise it prints the information on the first page with your document text immediately following. Other document formats found in AT&T troff are specific to AT&T or Berkeley, and are not supported in groff ms. FFoorrmmaatt aanndd llaayyoouutt By setting number registers, you can change your document's type (font and size), margins, spacing, headers and footers, and footnotes. See Document control registers below for more details. CCoovveerr ppaaggee A cover page consists of a title, and optionally the author's name and institution, an abstract, and the date. See Cover page macros below for more details.BBooddyy Following the cover page is your document. It consists of para-
graphs, headings, and lists. TTaabbllee ooff ccoonntteennttss Longer documents usually include a table of contents, which you can add by placing the TTCC macro at the end of your document. DDooccuummeenntt ccoonnttrrooll rreeggiisstteerrss The following table lists the document control number registers. Forthe sake of consistency, set registers related to margins at the begin-
ning of your document, or just after the RRPP macro. MMaarrggiinn sseettttiinnggss RReegg.. DDeeffiinniittiioonn EEffffeeccttiivvee DDeeffaauulltt---------------------------
PO Page offset (left mar- next page 1i
gin) LL Line length next para. 6i LT Header/footer length next para. 6i HM Top (header) margin next page 1i FM Bottom (footer) margin next page 1i---------------------------
TTeexxtt sseettttiinnggss RReegg.. DDeeffiinniittiioonn EEffffeeccttiivvee DDeeffaauulltt---------------------------
PS Point size next para. 10p VS Line spacing (leading) next para. 12p---------------------------
PPaarraaggrraapphh sseettttiinnggss RReegg.. DDeeffiinniittiioonn EEffffeeccttiivvee DDeeffaauulltt----------------------------
PI Initial indent next para. 5n PD Space between paragraphs next para. 0.3v QI Quoted paragraph indent next para. 5n----------------------------
FFoooottnnoottee sseettttiinnggss RReegg.. DDeeffiinniittiioonn EEffffeeccttiivvee DDeeffaauulltt---------------------------
FL Footnote length next footnote \n[LL]*5/6 FI Footnote indent next footnote 2n FF Footnote format next footnote 0FPS Point size next footnote \n[PS]-2
FVS Vert. spacing next footnote \n[FPS]+2 FPD Para. spacing next footnote \n[PD]/2---------------------------
OOtthheerr sseettttiinnggss RReegg.. DDeeffiinniittiioonn EEffffeeccttiivvee DDeeffaauulltt---------------------------
MINGW Minimum width between next page 2n columns---------------------------
CCoovveerr ppaaggee mmaaccrrooss Use the following macros to create a cover page for your document in the order shown. ..RRPP [[nnoo]]Specifies the report format for your document. The report for-
mat creates a separate cover page. With no RRPP macro, groff prints a subset of the cover page on page 1 of your document. If you use the optional nnoo argument, groff prints a title page but does not repeat any of the title page information (title, author, abstract, etc.) on page 1 of the document...PP11 (P-one) Prints the header on page 1. The default is to suppress
the header. ..DDAA [[xxx]] (optional) Print the current date, or the arguments to the macro if any, on the title page (if specified) and in the footers. This is the default for nroff. ..NNDD [[xxx]] (optional) Print the current date, or the arguments to the macro if any, on the title page (if specified) but not in the footers. This is the default for troff. ..TTLL Specifies the document title. Groff collects text following the TTLL macro into the title, until reaching the author name or abstract. ..AAUU Specifies the author's name. You can specify multiple authors by using an AAUU macro for each author. ..AAII Specifies the author's institution. You can specify multiple institutions. ..AABB [[nnoo]] Begins the abstract. The default is to print the word AABBSSTTRRAACCTT, centered and in italics, above the text of the abstract. The option nnoo suppresses this heading. ..AAEE End the abstract. PPaarraaggrraapphhss Use the PPPP macro to create indented paragraphs, and the LLPP macro to create paragraphs with no initial indent. The QQPP macro indents all text at both left and right margins. Theeffect is identical to the HTML <
graph or heading returns margins to normal. The XXPP macro produces an exdented paragraph. The first line of the paragraph begins at the left margin, and subsequent lines are indented (the opposite of PPPP). HHeeaaddiinnggss Use headings to create a hierarchical structure for your document. The ms macros print headings in bboolldd using the same font family and point size as the body text. The following heading macros are available: ..NNHH xx Numbered heading. The argument xx is either a numeric argument to indicate the level of the heading, or S xx xx "..." to set the section number explicitly. If you specify heading levels out of sequence, such as invoking ..NNHH 33 after ..NNHH 11, groff prints a warning on standard error. ..SSHH Unnumbered subheading. HHiigghhlliigghhttiinngg The ms macros provide a variety of methods to highlight or emphasize text: ..BB [[txt [[post [[pre]]]]]] Sets its first argument in bboolldd ttyyppee. If you specify a second argument, groff prints it in the previous font after the bold> element. The next para- text, with no intervening space (this allows you to set punctua-
tion after the highlighted text without highlighting the punctu-
ation). Similarly, it prints the third argument (if any) in the previous font bbeeffoorree the first argument. For example, .B foo ) ( prints (ffoooo).If you give this macro no arguments, groff prints all text fol-
lowing in bold until the next highlighting, paragraph, or head-
ing macro. ..RR [[txt [[post [[pre]]]]]] Sets its first argument in roman (or regular) type. It operates similarly to the BB macro otherwise. ..II [[txt [[post [[pre]]]]]] Sets its first argument in italic type. It operates similarly to the BB macro otherwise. ..CCWW [[txt [[post [[pre]]]]]] Sets its first argument in a constant width face. It operates similarly to the BB macro otherwise. ..BBII [[txt [[post [[pre]]]]]]Sets its first argument in bold italic type. It operates simi-
larly to the BB macro otherwise. ..BBXX [[txt]] Prints its argument and draws a box around it. If you want tobox a string that contains spaces, use a digit-width space (\0).
..UULL [[txt [[post]]]] Prints its first argument with an underline. If you specify a second argument, groff prints it in the previous font after the underlined text, with no intervening space. ..LLGG Prints all text following in larger type (2 points larger than the current point size) until the next font size, highlighting,paragraph, or heading macro. You can specify this macro multi-
ple times to enlarge the point size as needed. ..SSMM Prints all text following in smaller type (2 points smaller than the current point size) until the next type size, highlighting,paragraph, or heading macro. You can specify this macro multi-
ple times to reduce the point size as needed. ..NNLL Prints all text following in the normal point size (that is, the value of the PPSS register). \\**{{text\\**}} Print the enclosed text as a superscript. IInnddeennttss You may need to indent sections of text. A typical use for indents is to create nested lists and sublists. Use the RRSS and RREE macros to start and end a section of indented text, respectively. The PPII register controls the amount of indent. You can nest indented sections as deeply as needed by using multiple, nested pairs of RRSS and RREE. LLiissttss The IIPP macro handles duties for all lists. Its syntax is as follows: ..IIPP [[marker [[width]]]] The marker is usually a bullet character \\((bbuu for unorderedlists, a number (or auto-incrementing number register) for num-
bered lists, or a word or phrase for indented (glossary-style)
lists. The width specifies the indent for the body of each list item. Once specified, the indent remains the same for all list items in the document until specified again. TTaabb ssttooppss Use the ttaa request to set tab stops as needed. Use the TTAA macro to reset tabs to the default (every 5n). You can redefine the TTAA macro to create a different set of default tab stops. DDiissppllaayyss aanndd kkeeeeppssUse displays to show text-based examples or figures (such as code list-
ings). Displays turn off filling, so lines of code can be displayedas-is without inserting bbrr requests in between each line. Displays can
be kept on a single page, or allowed to break across pages. The fol-
lowing table shows the display types available. DDiissppllaayy mmaaccrroo TTyyppee ooff ddiissppllaayy WWiitthh kkeeeepp NNoo kkeeeepp-----------------------------
.DS L .LD Left-justified.
.DS I [indent] .ID Indented (default indent in the DDII register)..DS B .BD Block-centered (left-justi-
fied, longest line centered). .DS C .CD Centered..DS R .RD Right-justified.
-----------------------------
Use the DDEE macro to end any display type. The macros DDss and DDee are aliases for DDSS and DDEE, respectively. To keep text together on a page, such as a paragraph that refers to a table (or list, or other item) immediately following, use the KKSS and KKEE macros. The KKSS macro begins a block of text to be kept on a single page, and the KKEE macro ends the block. You can specify a floating keep using the KKFF and KKEE macros. If the keep cannot fit on the current page, groff holds the contents of the keep and allows text following the keep (in the source file) to fill in the remainder of the current page. When the page breaks, whether by an explicit bbpp request or by reaching the end of the page, groff prints the floating keep at the top of the new page. This is useful for printing large graphics or tables that do not need to appear exactly where specified. TTaabblleess,, ffiigguurreess,, eeqquuaattiioonnss,, aanndd rreeffeerreenncceessThe -ms macros support the standard groff preprocessors: tbl, pic, eqn,
and refer. Mark text meant for preprocessors by enclosing it in pairs of tags as follows: ..TTSS [[HH]] and ..TTEE Denotes a table, to be processed by the tbl preprocessor. The optional HH argument instructs groff to create a running header with the information up to the TTHH macro. Groff prints the header at the beginning of the table; if the table runs onto another page, groff prints the header on the next page as well. ..PPSS and ..PPEE Denotes a graphic, to be processed by the pic preprocessor. Youcan create a pic file by hand, using the AT&T pic manual avail-
able on the Web as a reference, or by using a graphics program such as xfig. ..EEQQ [[align]] and ..EENN Denotes an equation, to be processed by the eqn preprocessor. The optional align argument can be CC, LL, or II to center (thedefault), left-justify, or indent the equation.
..[[ and ..]] Denotes a reference, to be processed by the refer preprocessor. The GNU refer(1) manual page provides a comprehensive referenceto the preprocessor and the format of the bibliographic data-
base. FFoooottnnootteess The ms macros provide a flexible footnote system. You can specify a numbered footnote by using the \\**** escape, followed by the text of the footnote enclosed by FFSS and FFEE macros. You can specify symbolic footnotes by placing the mark character (such as \\((ddgg for the dagger character) in the body text, followed by the text of the footnote enclosed by FFSS \\((ddgg and FFEE macros. You can control how groff prints footnote numbers by changing the value of the FFFF register as follows: 0 Prints the footnote number as a superscript; indents the footnote (default). 1 Prints the number followed by a period (like 1.) and indents the footnote. 2 Like 1, without an indent.3 Like 1, but prints the footnote number as a hanging para-
graph. You can use footnotes safely within keeps and displays, but avoid using numbered footnotes within floating keeps. You can set a second \\**** between a \\**** and its corresponding ..FFSS; as long as each ..FFSS occurs after the corresponding \\**** and the occurrences of ..FFSS are in the same order as the corresponding occurrences of \\****. HHeeaaddeerrss aanndd ffooootteerrss There are two ways to define headers and footers: +o Use the strings LLHH, CCHH, and RRHH to set the left, center, and rightheaders; use LLFF, CCFF, and RRFF to set the left, center, and right foot-
ers. This works best for documents that do not distinguish between odd and even pages. +o Use the OOHH and EEHH macros to define headers for the odd and even pages; and OOFF and EEFF macros to define footers for the odd and even pages. This is more flexible than defining the individual strings. The syntax for these macros is as follows: ..OOHH ''left''center''right'' You can replace the quote (') marks with any character not appearing in the header or footer text. MMaarrggiinnssYou control margins using a set of number registers. The following ta-
ble lists the register names and defaults: RReegg.. DDeeffiinniittiioonn EEffffeeccttiivvee DDeeffaauulltt---------------------------
PO Page offset (left mar- next page 1i
gin) LL Line length next para. 6i LT Header/footer length next para. 6i HM Top (header) margin next page 1i FM Bottom (footer) margin next page 1i---------------------------
Note that there is no right margin setting. The combination of page offset and line length provide the information necessary to derive the right margin. MMuullttiippllee ccoolluummnnss The ms macros can set text in as many columns as will reasonably fit on the page. The following macros are available. All of them force apage break if a multi-column mode is already set. However, if the cur-
rent mode is single-column, starting a multi-column mode does not force
a page break...11CC Single-column mode.
..22CC Two-column mode.
..MMCC [[width [[gutter]]]]Multi-column mode. If you specify no arguments, it is equiva-
lent to the 22CC macro. Otherwise, width is the width of eachcolumn and gutter is the space between columns. The MMIINNGGWW num-
ber register is the default gutter width. CCrreeaattiinngg aa ttaabbllee ooff ccoonntteennttss Wrap text that you want to appear in the table of contents in XXSS and XXEE macros. Use the TTCC macro to print the table of contents at the end of the document, resetting the page number to ii (Roman numeral 1). You can manually create a table of contents by specifying a page number as the first argument to XXSS. Add subsequent entries using the XXAA macro. For example: .XS 1 Introduction .XA 2 A Brief History of the Universe .XA 729 Details of Galactic Formation ... .XEUse the PPXX macro to print a manually-generated table of contents with-
out resetting the page number.If you give the argument nnoo to either PPXX or TTCC, groff suppresses print-
ing the title specified by the \\**[[TTOOCC]] string. DDIIFFFFEERREENNCCEESS FFRROOMM ttrrooffff mmssThe groff ms macros are a complete re-implementation, using no original
AT&T code. Since they take advantage of the extended features in groff, they cannot be used with AT&T troff. Other differences include: +o The internals of groff ms differ from the internals of Unix ms. Documents that depend upon implementation details of Unix ms may not format properly with groff ms.+o The error-handling policy of groff ms is to detect and report
errors, rather than silently to ignore them. +o Bell Labs localisms are not implemented. +o Berkeley localisms, in particular the TTMM and CCTT macros, are not implemented.+o Groff ms does not work in compatibility mode (e.g. with the -CC
option).+o There is no support for typewriter-like devices.
+o Groff ms does not provide cut marks.+o Multiple line spacing is not supported (use a larger vertical spac-
ing instead). +o Some Unix ms documentation says that the CCWW and GGWW number registerscan be used to control the column width and gutter width respec-
tively. These number registers are not used in groff ms. +o Macros that cause a reset (paragraphs, headings, etc.) may change the indent. Macros that change the indent do not increment or decrement the indent, but rather set it absolutely. This can cause problems for documents that define additional macros of their own. The solution is to use not the iinn request but instead the RRSS and RREE macros. +o The number register GGSS is set to 1 by the groff ms macros, but is not used by the Unix ms macros. Documents that need to determine whether they are being formatted with Unix ms or groff ms should use this number register. SSttrriinnggss You can redefine the following strings to adapt the groff ms macros to languages other than English: SSttrriinngg DDeeffaauulltt VVaalluuee-----------------
REFERENCES References ABSTRACT ABSTRACT TOC Table of Contents MONTH1 January MONTH2 February MONTH3 March MONTH4 April MONTH5 May MONTH6 June MONTH7 July MONTH8 August MONTH9 September MONTH10 October MONTH11 November MONTH12 December-----------------
The \\**- string produces an em dash - like this.
TTeexxtt SSeettttiinnggssThe FFAAMM string sets the default font family. If this string is unde-
fined at initialization, it is set to Times.The point size, vertical spacing, and inter-paragraph spacing for foot-
notes are controlled by the number registers FFPPSS, FFVVSS, and FFPPDD; at ini-
tialization these are set to \\nn((PPSS-22, \\nn[[FFPPSS]]++22, and \\nn((PPDD//22 respec-
tively. If any of these registers are defined before initialization, the initialization macro does not change them. The hyphenation flags (as set by the hhyy request) are set from the HHYY register; the default is 14. Improved accent marks (as originally defined in Berkeley's ms version)are available by specifying the AAMM macro at the beginning of your docu-
ment. You can place an accent over most characters by specifying the string defining the accent directly after the character. For example, nn\\**~~ produces an n with a tilde over it. NNAAMMIINNGG CCOONNVVEENNTTIIOONNSS The following conventions are used for names of macros, strings and number registers. External names available to documents that use the groff ms macros contain only uppercase letters and digits. Internally the macros are divided into modules; naming conventions are as follows: +o Names used only within one module are of the form module**name. +o Names used outside the module in which they are defined are of the form module@@name. +o Names associated with a particular environment are of the form environment::name; these are used only within the ppaarr module. +o name does not have a module prefix. +o Constructed names used to implement arrays are of the form array!!index. Thus the groff ms macros reserve the following names: +o Names containing the characters **, @@, and ::. +o Names containing only uppercase letters and digits. FILES //uussrr//sshhaarree//ggrrooffff//11..1199..11//ttmmaacc//mmss..ttmmaacc (a wrapper file for ss..ttmmaacc) //uussrr//sshhaarree//ggrrooffff//11..1199..11//ttmmaacc//ss..ttmmaaccSEE ALSO
ggrrooffff(1), ttrrooffff(1), ttbbll(1), ppiicc(1), eeqqnn(1), rreeffeerr(1), Groff: The GNU Implementation of troff by Trent Fisher and Werner Lemberg. AUTHOR Original manual page by James Clark et al; rewritten by Larry Kollar (lkollar@despammed.com). Groff Version 1.19.1 18 July 2003 GROFFMS(7)