Sun Microsystems, Inc.
spacerspacer
spacer   www.sun.com docs.sun.com | | |  
spacer
black dot
   
A   B   C   D   E   F   G   H   I   J   K   L   M   N   O   P   Q   R   S   T   U   V   W   X   Y   Z
    
 
Standards, Environments, and Macrosms(5)


NAME

 ms - text formatting macros

SYNOPSIS

 nroff -ms [options] filename ...
 troff -ms [options] filename ...

DESCRIPTION

 

This package of nroff(1) and troff(1) macro definitions provides a formatting facility for various styles of articles, theses, and books. When producing 2-column output on a terminal or lineprinter, or when reverse line motions are needed, filter the output through col(1). All external -ms macros are defined below.

Note: this -ms macro package is an extended version written at Berkeley and is a superset of the standard -ms macro packages as supplied by Bell Labs. Some of the Bell Labs macros have been removed; for instance, it is assumed that the user has little interest in producing headers stating that the memo was generated at Whippany Labs.

Many nroff and troff requests are unsafe in conjunction with this package. However, the first four requests below may be used with impunity after initialization, and the last two may be used even before initialization:

.bp
begin new page
.br
break output line
.sp n
insert n spacing lines
.ce n
center next n lines
.ls n
line spacing: n=1 single, n=2 double space
.na
no alignment of right margin

Font and point size changes with \f and \s are also allowed; for example, \fIword\fR will italicize word. Output of the tbl(1), eqn(1) and refer(1) preprocessors for equations, tables, and references is acceptable as input.

REQUESTS

 
Macro NameInitial ValueBreak? Reset?Explanation
.AB x-ybegin abstract; if x=no do not label abstract
.AE-yend abstract
.AI-yauthor's institution
.AM-nbetter accent mark definitions
.AU-yauthor's name
.B x-nembolden x; if no x, switch to boldface
.B1-ybegin text to be enclosed in a box
.B2-yend boxed text and print it
.BTdatenbottom title, printed at foot of page
.BX x-nprint word x in a box
.CMif tncut mark between pages
.CT-y,ychapter title: page number moved to CF (TM only)
.DA xif nnforce date x at bottom of page; today if no x
.DEtblbr-yend display (unfilled text) of any kind
.DS x yIybegin display with keep; x=I,L,C,B; y=indent
.ID y8n,.5iyindented display with no keep; y=indent
.LD-yleft display with no keep
.CD-ycentered display with no keep
.BD-yblock display; center entire block
.EF x-neven page footer x (3 part as for .tl)
.EH x-neven page header x (3 part as for .tl)
.EN-yend displayed equation produced by eqn
.EQ x y-ybreak out equation; x=L,I,C; y=equation number
.FEtblbr-nend footnote to be placed at bottom of page
.FP-nnumbered footnote paragraph; may be redefined
.FS x-nstart footnote; x is optional footnote label
.HDundefnoptional page header below header margin
.I x-nitalicize x; if no x, switch to italics
.IP x y-y,yindented paragraph, with hanging tag x; y=indent
.IX x y-yindex words x y and so on (up to 5 levels)
.KE-nend keep of any kind
.KF-nbegin floating keep; text fills remainder of page
.KS-ybegin keep; unit kept together on a single page
.LG-nlarger; increase point size by 2
.LPtblbr-y,yleft (block) paragraph.
.MC x-y,ymultiple columns; x=column width
.ND xif tnno date in page footer; x is date on cover
.NH x y-y,ynumbered header; x=level, x=0 resets, x=S sets to y
.NL10pnset point size back to normal
.OF x-nodd page footer x (3 part as for .tl)
.OH x-nodd page header x (3 part as for .tl)
.P1if TMnprint header on first page
.PP-y,yparagraph with first line indented
.PT- % -npage title, printed at head of page
.PX x-yprint index (table of contents); x=no suppresses title
.QP-y,yquote paragraph (indented and shorter)
.Ronnreturn to Roman font
.REtblbr5ny,yretreat: end level of relative indentation
.RP x-nreleased paper format; x=no stops title on first page
.RS5ny,yright shift: start level of relative indentation
.SH-y,ysection header, in boldface
.SM-nsmaller; decrease point size by 2
.TA8n,5nnset TAB characters to 8n 16n ... (nroff) or 5n 10n ... (troff)
.TC x-yprint table of contents at end; x=no suppresses title
.TE-yend of table processed by tbl
.THtblbr-yend multi-page header of table
.TL-ytitle in boldface and two points larger
.TMoffnUC Berkeley thesis mode
.TS x-y,ybegin table; if x=H table has multi-page header
.UL x-nunderline x, even in troff
.UX x-nUNIX; trademark message first time; x appended
.XA x y-yanother index entry; x=page or no for none; y=indent
.XE-yend index entry (or series of .IX entries)
.XP-y,yparagraph with first line indented, others indented
.XS x y-ybegin index entry; x=page or no for none; y=indent
.1Cony,yone column format, on a new page
.2C-y,ybegin two column format
.]--nbeginning of refer reference
.[0-nend of unclassifiable type of reference
.[N-nN= 1:journal-article, 2:book, 3:book-article, 4:report

REGISTERS

 

Formatting distances can be controlled in -ms by means of built-in number registers. For example, this sets the line length to 6.5 inches:

 
.nr  LL  6.5i

Here is a table of number registers and their default values:

NameRegister ControlsTakes EffectDefault
PSpoint size paragraph10
VSvertical spacingparagraph12
LLline length paragraph6i
LTtitle length next pagesame as LL
FLfootnote length next .FS5.5i
PDparagraph distanceparagraph1v (if n), .3v (if t)
DDdisplay distancedisplays1v (if n), .5v (if t)
PIparagraph indentparagraph5n
QIquote indent next .QP5n
FIfootnote indent next .FS2n
POpage offset next page0 (if n), [ap ]1i (if t)
HMheader margin next page1i
FMfooter margin next page1i
FFfootnote format next .FS0 (1, 2, 3 available)

When resetting these values, make sure to specify the appropriate units. Setting the line length to 7, for example, will result in output with one character per line. Setting FF to 1 suppresses footnote superscripting; setting it to 2 also suppresses indentation of the first line; and setting it to 3 produces an .IP-like footnote paragraph.

Here is a list of string registers available in -ms; they may be used anywhere in the text:

NameString's Function
\*Qquote (" in nroff, " in troff )
\*U unquote (" in nroff, " in troff )
\*-dash (-- in nroff, -- in troff )
\*(MOmonth (month of the year)
\*(DYday (current date)
\**automatically numbered footnote
\*'acute accent (before letter)
\*`grave accent (before letter)
\*^circumflex (before letter)
\*,cedilla (before letter)
\*:umlaut (before letter)
\*~tilde (before letter)

When using the extended accent mark definitions available with .AM, these strings should come after, rather than before, the letter to be accented.

FILES

 
/usr/share/lib/tmac/s
/usr/share/lib/tmac/ms.???

SEE ALSO

 

col(1), eqn(1), nroff(1), refer(1), tbl(1), troff(1)

BUGS

 

Floating keeps and regular keeps are diverted to the same space, so they cannot be mixed together with predictable results.


SunOS 5.9Go To TopLast Changed 25 Feb 1992

 
      
      
Copyright 2002 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.