Seth Woolley's Man Viewer

groff_ms(7) - groff_ms - groff ms macros - man 7 groff_ms

([section] manual, -k keyword, -K [section] search, -f whatis)
man plain no title

GROFF_MS(7)                                                        GROFF_MS(7)



NAME
       groff_ms - groff(1,7) ms macros

SYNOPSIS
       groff(1,7) -ms [ options... ] [ files... ]
       groff(1,7) -m ms [ options... ] [ files... ]

DESCRIPTION
       This  manual  page  describes the GNU version(1,3,5) of the ms macros, part of
       the groff(1,7) 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.

USAGE
       The  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:

       Document type
              If you use the RP (report) macro at the beginning of  the  docu-
              ment,  groff(1,7)  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(1,8) AT&T troff are specific to AT&T or  Berkeley,  and  are
              not supported in(1,8) groff(1,7) ms.

       Format and layout
              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.

       Cover page
              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.

       Body   Following the cover page is your document.  It consists of para-
              graphs, headings, and lists.

       Table of contents
              Longer  documents usually include a table of contents, which you
              can add by placing the TC macro at the end of your document.

   Document control registers
       The following table lists the document control number  registers.   For
       the sake of consistency, set(7,n,1 builtins) registers related to margins at the begin-
       ning of your document, or just after the RP macro.

       Margin settings

              Reg.          Definition         Effective    Default
              ------------------------------------------------------
               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
              ------------------------------------------------------

       Text settings

              Reg.          Definition         Effective    Default
              ------------------------------------------------------
               PS     Point size               next para.   10p
               VS     Line spacing (leading)   next para.   12p
              ------------------------------------------------------

       Paragraph settings

              Reg.          Definition          Effective    Default
              -------------------------------------------------------
               PI    Initial indent             next para.   5n
               PD    Space between paragraphs   next para.   0.3v
               QI    Quoted paragraph indent    next para.   5n
              -------------------------------------------------------

       Footnote settings

              Reg.      Definition        Effective      Default
              -----------------------------------------------------
               FL     Footnote length   next footnote   \n[LL]*5/6
               FI     Footnote indent   next footnote   2n
               FF     Footnote format   next footnote   0
               FPS    Point size        next footnote   \n[PS]-2
               FVS    Vert. spacing     next footnote   \n[FPS]+2
               FPD    Para. spacing     next footnote   \n[PD]/2
              -----------------------------------------------------

       Other settings

               Reg.          Definition         Effective   Default
              ------------------------------------------------------
               MINGW    Minimum width between   next page   2n
                        columns
              ------------------------------------------------------

   Cover page macros
       Use the following macros to create a cover page for  your  document  in(1,8)
       the order shown.

       .RP [no]
              Specifies  the report format for your document.  The report for-
              mat creates a separate cover page.   With  no  RP  macro,  groff(1,7)
              prints a subset of the cover page on page 1 of your document.

              If  you  use the optional no argument, groff(1,7) prints a title page
              but does not repeat any of the title  page  information  (title,
              author, abstract, etc.) on page 1 of the document.

       .P1    (P-one) Prints the header on page 1.  The default is to suppress
              the header.

       .DA [xxx]
              (optional) Print the current date, or the arguments to the macro
              if(3,n)  any,  on  the  title page (if(3,n) specified) and in(1,8) the footers.
              This is the default for nroff.

       .ND [xxx]
              (optional) Print the current date, or the arguments to the macro
              if(3,n) any, on the title page (if(3,n) specified) but not in(1,8) the footers.
              This is the default for troff.

       .TL    Specifies the document title.  Groff collects text following the
              TL  macro  into  the  title,  until  reaching the author name or
              abstract.

       .AU    Specifies the author's name.  You can specify  multiple  authors
              by using an AU macro for each author.

       .AI    Specifies  the  author's  institution.  You can specify multiple
              institutions.

       .AB [no]
              Begins the abstract.  The default is to print the word ABSTRACT,
              centered  and  in(1,8)  italics, above the text of the abstract.  The
              option no suppresses this heading.

       .AE    End the abstract.

   Paragraphs
       Use the PP macro to create indented paragraphs, and  the  LP  macro  to
       create paragraphs with no initial indent.

       The  QP  macro  indents  all  text at both left and right margins.  The
       effect is identical to the HTML <BLOCKQUOTE> element.  The  next  para-
       graph or heading returns margins to normal.

       The  XP  macro  produces  an exdented paragraph.  The first line of the
       paragraph begins at the left margin, and subsequent lines are  indented
       (the opposite of PP).

   Headings
       Use headings to create a hierarchical structure for your document.  The
       ms macros print headings in(1,8) bold using the same font family  and  point
       size as the body text.

       The following heading macros are available:

       .NH xx Numbered  heading.  The argument xx is either a numeric argument
              to indicate the level of the heading, or S xx xx "..."   to  set(7,n,1 builtins)
              the  section  number  explicitly.  If you specify heading levels
              out of sequence, such  as  invoking  .NH 3  after  .NH 1,  groff(1,7)
              prints a warning on standard error.

       .SH    Unnumbered subheading.

   Highlighting
       The  ms  macros  provide a variety of methods to highlight or emphasize
       text:

       .B [txt [post [pre]]]
              Sets its first argument in(1,8) bold type.  If you specify  a  second
              argument,  groff(1,7)  prints  it in(1,8) the previous font after the bold
              text, with no intervening space (this allows you to set(7,n,1 builtins) punctua-
              tion after the highlighted text without highlighting the punctu-
              ation).  Similarly, it prints the third argument (if(3,n) any) in(1,8) the
              previous font before the first argument.  For example,

                     .B foo ) (

              prints (foo).

              If  you give this macro no arguments, groff(1,7) prints all text fol-
              lowing in(1,8) bold until the next highlighting, paragraph, or  head-
              ing macro.

       .R [txt [post [pre]]]
              Sets its first argument in(1,8) roman (or regular) type.  It operates
              similarly to the B macro otherwise.

       .I [txt [post [pre]]]
              Sets its first argument in(1,8) italic type.  It  operates  similarly
              to the B macro otherwise.

       .CW [txt [post [pre]]]
              Sets  its  first argument in(1,8) a constant width face.  It operates
              similarly to the B macro otherwise.

       .BI [txt [post [pre]]]
              Sets its first argument in(1,8) bold italic type.  It operates  simi-
              larly to the B macro otherwise.

       .BX [txt]
              Prints  its  argument and draws a box around it.  If you want to
              box a string(3,n) that contains spaces, use a digit-width space (\0).

       .UL [txt [post]]
              Prints  its  first argument with an underline.  If you specify a
              second argument, groff(1,7) prints it in(1,8) the previous font after  the
              underlined text, with no intervening space.

       .LG    Prints  all  text following in(1,8) 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.

       .SM    Prints all text following in(1,8) 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.

       .NL    Prints all text following in(1,8) the normal point size (that is, the
              value of the PS register).

       \*{text\*}
              Print the enclosed text as a superscript.

   Indents
       You may need to indent sections of text.  A typical use for indents  is
       to create nested lists and sublists.

       Use  the  RS and RE macros to start and end a section of indented text,
       respectively.  The PI register controls the amount of indent.

       You can nest indented sections as deeply as needed by  using  multiple,
       nested pairs of RS and RE.

   Lists
       The IP macro handles duties for all lists.  Its syntax is as follows:

       .IP [marker [width]]

              The  marker  is  usually  a  bullet character \(bu for unordered
              lists, 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(1,8) the document until specified again.

   Tab stops
       Use the ta request to set(7,n,1 builtins) tab stops as needed.  Use  the  TA  macro  to
       reset(1,7,1 tput) tabs to the default (every 5n).  You can redefine the TA macro to
       create a different set(7,n,1 builtins) of default tab stops.

   Displays and keeps
       Use displays to show text-based examples or figures (such as code list-
       ings).   Displays  turn  off filling, so lines of code can be displayed
       as-is without inserting br requests in(1,8) 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.

                   Display macro                Type of display
                With keep      No keep
              ---------------------------------------------------------
              .DS L            .LD       Left-justified.
              .DS I [indent]   .ID       Indented (default indent in(1,8)
                                         the DI register).
              .DS B            .BD       Block-centered (left-justi-
                                         fied, longest line centered).
              .DS C            .CD       Centered.
              .DS R            .RD       Right-justified.
              ---------------------------------------------------------

       Use  the  DE  macro  to end any display type.  The macros Ds and De are
       aliases for DS and DE, 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 KS and KE
       macros.  The KS macro begins a block of text to be  kept  on  a  single
       page, and the KE macro ends the block.

       You  can  specify  a  floating keep using the KF and KE macros.  If the
       keep cannot fit on the current page, groff(1,7) holds the  contents  of  the
       keep and allows text following the keep (in(1,8) the source file(1,n)) to fill in(1,8)
       the remainder of the current page.  When the page breaks, whether by an
       explicit  bp  request  or by reaching the end of the page, groff(1,7) 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.

   Tables, figures, equations, and references
       The -ms macros support the standard groff(1,7) preprocessors: tbl, pic, eqn,
       and  refer.  Mark text meant for preprocessors by enclosing it in(1,8) pairs
       of tags as follows:

       .TS [H] and .TE
              Denotes a table, to be processed by the tbl  preprocessor.   The
              optional  H  argument instructs groff(1,7) to create a running header
              with the information up to  the  TH  macro.   Groff  prints  the
              header  at  the  beginning  of the table; if(3,n) the table runs onto
              another page, groff(1,7) prints the header on the next page as  well.

       .PS and .PE
              Denotes a graphic, to be processed by the pic preprocessor.  You
              can create a pic file(1,n) 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.

       .EQ [align] and .EN
              Denotes an equation, to be processed by  the  eqn  preprocessor.
              The  optional  align  argument  can be C, L, or I to center (the
              default), 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 reference
              to the preprocessor and the format of  the  bibliographic  data-
              base.

   Footnotes
       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 FS and FE macros.

       You  can specify symbolic footnotes by placing the mark character (such
       as \(dg for the dagger character) in(1,8) the body  text,  followed  by  the
       text of the footnote enclosed by FS \(dg and FE macros.

       You can control how groff(1,7) prints footnote numbers by changing the value
       of the FF 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(7,n,1 builtins)  a  second  \**
       between  a  \**  and  its corresponding .FS; as long as each .FS occurs
       after the corresponding \** and the occurrences of .FS are in(1,8) the  same
       order as the corresponding occurrences of \**.

   Headers and footers
       There are two ways to define headers and footers:

         Use  the  strings  LH, CH, and RH to set(7,n,1 builtins) the left, center, and right
          headers; use LF, CF, and RF to set(7,n,1 builtins) the left, center, and right foot-
          ers.   This works best for documents that do not distinguish between
          odd and even pages.

         Use the OH and EH macros to define headers  for  the  odd  and  even
          pages;  and  OF and EF 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:

                 .OH 'left'center'right'

          You can replace the quote (') marks with any character not appearing
          in(1,8) the header or footer text.

   Margins
       You control margins using a set(7,n,1 builtins) of number registers.  The following ta-
       ble lists the register names and defaults:

              Reg.          Definition         Effective    Default
              ------------------------------------------------------
               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.

   Multiple columns
       The ms macros can set(7,n,1 builtins) text in(1,8) as many columns as will reasonably fit on
       the  page.   The  following  macros are available.  All of them force a
       page break if(3,n) a multi-column mode is already set.  However, if(3,n) the cur-
       rent mode is single-column, starting a multi-column mode does not force
       a page break.

       .1C    Single-column mode.

       .2C    Two-column mode.

       .MC [width [gutter]]
              Multi-column mode.  If you specify no arguments, it  is  equiva-
              lent  to  the  2C  macro.  Otherwise, width is the width of each
              column and gutter is the space between columns.  The MINGW  num-
              ber register is the default gutter width.

   Creating a table of contents
       Wrap text that you want to appear in(1,8) the table of contents in(1,8) XS and XE
       macros.  Use the TC macro to print the table of contents at the end  of
       the document, resetting the page number to i (Roman numeral 1).

       You can manually create a table of contents by specifying a page number
       as the first argument to XS.   Add  subsequent  entries  using  the  XA
       macro.  For example:

              .XS 1
              Introduction
              .XA 2
              A Brief History of the Universe
              .XA 729
              Details of Galactic Formation
              ...
              .XE

       Use  the PX macro to print a manually-generated table of contents with-
       out resetting the page number.

       If you give the argument no to either PX or TC, groff(1,7) suppresses print-
       ing the title specified by the \*[TOC] string.

DIFFERENCES FROM troff ms
       The groff(1,7) ms macros are a complete re-implementation, using no original
       AT&T code.  Since they take  advantage  of  the  extended  features  in(1,8)
       groff(1,7), they cannot be used with AT&T troff.  Other differences include:

         The internals of groff(1,7) ms differ from  the  internals  of  Unix  ms.
          Documents that depend upon implementation details of Unix ms may not
          format properly with groff(1,7) ms.

         The error-handling policy of  groff(1,7)  ms  is  to  detect  and  report
          errors, rather than silently to ignore them.

         Bell Labs localisms are not implemented.

         Berkeley  localisms,  in(1,8)  particular  the  TM and CT macros, are not
          implemented.

         Groff ms does not work in(1,8)  compatibility  mode  (e.g.  with  the  -C
          option).

         There is no support for typewriter-like devices.

         Groff ms does not provide cut marks.

         Multiple  line spacing is not supported (use a larger vertical spac-
          ing instead).

         Some Unix ms documentation says that the CW and GW number  registers
          can  be  used  to  control the column width and gutter width respec-
          tively.  These number registers are not used in(1,8) groff(1,7) ms.

         Macros that cause a reset(1,7,1 tput) (paragraphs, headings, etc.)   may  change
          the  indent.   Macros  that  change  the  indent do not increment or
          decrement the indent, but rather set(7,n,1 builtins) it absolutely.  This can  cause
          problems  for  documents that define additional macros of their own.
          The solution is to use not the in(1,8) request but instead the RS and  RE
          macros.

         The  number  register  GS is set(7,n,1 builtins) to 1 by the groff(1,7) 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(1,7) ms should use
          this number register.

   Strings
       You can redefine the following strings to adapt the groff(1,7) ms macros  to
       languages other than English:

                             String        Default Value
                          ---------------------------------
                           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(3,n) produces an em dash -- like this.

   Text Settings
       The  FAM  string(3,n) sets the default font family.  If this string(3,n) is unde-
       fined at initialization, it is set(7,n,1 builtins) to Times.

       The point size, vertical spacing, and inter-paragraph spacing for foot-
       notes are controlled by the number registers FPS, FVS, and FPD; at ini-
       tialization these are set(7,n,1 builtins) to \n(PS-2, \n[FPS]+2,  and  \n(PD/2  respec-
       tively.   If  any of these registers are defined before initialization,
       the initialization macro does not change them.

       The hyphenation flags (as set(7,n,1 builtins) by the hy request) are set(7,n,1 builtins)  from  the  HY
       register; the default is 14.

       Improved  accent marks (as originally defined in(1,8) Berkeley's ms version(1,3,5))
       are available by specifying the AM macro at the beginning of your docu-
       ment.   You  can place an accent over most characters by specifying the
       string(3,n) defining the accent directly after the character.  For  example,
       n\*~ produces an n with a tilde over it.

NAMING CONVENTIONS
       The  following  conventions  are  used for names of macros, strings and
       number registers.  External names available to documents that  use  the
       groff(1,7) ms macros contain only uppercase letters and digits.

       Internally  the macros are divided into modules; naming conventions are
       as follows:

         Names used only within one module are of the form module*name.

         Names used outside the module in(1,8) which they are defined are  of  the
          form module@name.

         Names  associated  with  a  particular  environment  are of the form
          environment:name; these are used only within the par module.

         name does not have a module prefix.

         Constructed  names  used  to  implement  arrays  are  of  the   form
          array!index.

       Thus the groff(1,7) ms macros reserve the following names:

         Names containing the characters *, @, and :.

         Names containing only uppercase letters and digits.

FILES
       /usr/share/groff(1,7)/1.19.1/tmac/ms.tmac (a wrapper file(1,n) for s.tmac)
       /usr/share/groff(1,7)/1.19.1/tmac/s.tmac

SEE ALSO
       groff(1,7)(1),  troff(1),  tbl(1),  pic(1), eqn(1), refer(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                      GROFF_MS(7)

References for this manual (incoming links)