Next: Lists in ms, Previous: Headings in ms, Up: ms Body Text [Contents][Index]
The ms macros provide a variety of ways to style text. Attend closely to the ordering of arguments labeled pre and post, which is not intuitive. Support for pre arguments is a GNU extension.15
Style text in bold, followed by post in the previous font style without intervening space, and preceded by pre similarly. Without arguments, ms styles subsequent text in bold until the next paragraphing, heading, or no-argument typeface macro call.
As B
, but use the roman style (upright text of normal weight)
instead of bold. Argument recognition is a GNU extension.
As B
, but use an italic or oblique style instead of bold.
As B
, but use a bold italic or bold oblique style instead of
upright bold. This is a Research Tenth Edition Unix extension.
As B
, but use a constant-width (monospaced) roman typeface
instead of bold. This is a Research Tenth Edition Unix extension.
Typeset text and draw a box around it. On terminals, reverse
video or another means of highlighting is used instead. If you want
text to contain space, use unbreakable space or horizontal motion
escape sequences (\~
, \SPC
, \^
, \|
,
\0
or \h
).
Typeset text with an underline. On terminals, text is bracketed with underscores ‘_’. post, if present, is set after text with no intervening space.
Set subsequent text in larger type (two points larger than the current size) until the next type size, paragraphing, or heading macro call. Call the macro multiple times to enlarge the type size further.
Set subsequent text in smaller type (two points smaller than the current size) until the next type size, paragraphing, or heading macro call. Call the macro multiple times to reduce the type size further.
Set subsequent text at the normal type size (the amount in register
PS
).
pre and post arguments are typically used to simplify the
attachment of punctuation to styled words. When pre is used,
a hyphenation control escape sequence \%
that would ordinarily
start text must start pre instead to have the desired
effect.
The CS course's students found one C language keyword .CW static ) \%( most troublesome.
The foregoing example produces output as follows.
The CS course’s students found one C language keyword (static)
most troublesome.
|
You can use the output line continuation escape sequence \c
to
achieve the same result (see Line Continuation). It is also
portable to older ms implementations.
The CS course's students found one C language keyword \%(\c .CW \%static ) most troublesome.
groff
ms also offers strings to begin and end super- and
subscripting. These are GNU extensions.
Begin and end superscripting, respectively.
Begin and end subscripting, respectively.
Rather than calling the CW
macro, in groff
ms you
might prefer to change the font family to Courier by setting the
FAM
string to ‘C’. You can then use all four style macros
above, returning to the default family (Times) with ‘.ds FAM T’.
Because changes to FAM
take effect only at the next paragraph,
CW
remains useful to “inline” a change to the font family,
similarly to the practice of this document in noting syntactical
elements of ms and groff
.
Next: Lists in ms, Previous: Headings in ms, Up: ms Body Text [Contents][Index]