groff_mm - groff mm macros
groff -mm [ options... ] [ files... ]
The groff mm macros are intended to be compatible with the DWB mm macros with the following limitations:
|
• |
no letter macros implemented (yet). |
|||
|
• |
no Bell Labs localisms implemented. |
|||
|
• |
the macros OK, PM and TM is not implemented. |
|||
|
• |
groff mm does not support cut marks |
mm is intended to be international. Therefore it is possible to write short national macrofiles which change all english text to the preferred language. Use mmse as an example.
Groff mm has several extensions:
|
B1 |
Begin box (as the ms macro) Draws a box around the text. | ||
|
B2 |
End box. Finish the box. | ||
|
BVL |
Start of broken variable-item list. As VL but text begins always at the next line |
COVER [arg]
Works just like MT, but reads from /usr/local/lib/groff/tmac/mm/*.cov instead. arg is used together with .cov to find a macrofile with the selected headermacros, like ms.cov. ms.cov is supposed to look like the ms coversheet. It is also possible to control size and fonts of title and abstract, since COVER is before .TL, .AS and the rest. Only a few coverfiles exists at the moment.
COVEND
This finish the cover description and prints the cover-page. It is defined in the cover file.
GETHN refname [varname]
Includes the headernumber where the corresponding SETR refname was placed. Will be X.X.X. in pass 1. See INITR. If varname is used, GETHN sets the variable varname to the headernumber.
GETPN refname [varname]
Includes the pagenumber where the corresponding SETR refname was placed. Will be 9999 in pass 1. See INITR. If varname is used, GETPN sets the variable varname to the pagenumber.
GETR refname
Combines GETHN and
GETPN with the text ’chapter’ and
’, page’. The string Qrf contains the
text for reference:
.ds Qrf See chapter \\*[Qrfh], page \\*[Qrfp].
Qrf may be changed to support other languages. Strings
Qrfh and Qrfp are set by GETR and
contains the page and headernumber.
GETST refname [varname]
Includes the string saved with the second argument to .SETR. Will be dummystring in pass 1. If varname is used, GETST sets the variable varname to the saved string. See INITR.
INITR filename
Initialize the refencemacros. References will be written to filename.tmp and filename.qrf. Requires two passes with groff. The first looks for references and the second includes them. INITR can be used several times, but it is only the first occurence of INITR that is active. See also SETR, GETPN and GETHN.
MC column-size [column-separation]
Begin multiple columns. Return to normal with 1C.
MT [arg [addressee]]
Memorandom type. Well, not new, but different. The arg is part of a filename in /usr/local/lib/groff/tmac/mm/*.MT. So, it is possible to write even the AT&T covers now. Addresse just sets a variable, used in the AT&T macros. An example of a macro file can be found in 0.MT.
MOVE y-pos [x-pos [line-length]]
Move to a position, pageoffset set to x-pos. If line-length is not given, the difference between current and new pageoffset is used. Use PGFORM without arguments to return to normal.
PGFORM [linelength [pagelength [pageoffset]]]
Sets linelength, pagelength and/or pageoffset. This macro can be used for special formatting, like letterheads and other. PGFORM can be used without arguments to reset everything after a MOVE.
|
PGNH |
No header is printed on the next page. Used to get rid off the header in letters or other special texts This macro must be used before any text to inhibit the pageheader on the first page. |
SETR refname [string]
Remember the current header and page-number as refname. Saves string if string is defined. string is retrieved with .GETST. See INITR.
|
TAB |
reset tabs to every 5n. Normally used to reset any previous tabpositions. |
VERBON
Begin verbatim output using courier font. Usually for printing programs. All character has equal width.
VERBOFF
End verbatim output.
New variables in mm:
|
Lifg |
String containing Figure. |
|||
|
Litb |
String containing TABLE. |
|||
|
Liex |
String containing Exhibit. |
|||
|
Liec |
String containing Equation. |
|||
|
Licon |
String containing CONTENTS. |
MO1 - MO12
Strings containing January to December.
|
Qrf |
String containing "See chapter \\*[Qrfh], page \\n[Qrfp].". |
|||
|
.mgm |
Always 1. |
The following standard macros are implemented:
|
1C |
Begin one column processing |
|||
|
2C |
Begin two column processing |
|||
|
AE |
Abstract end |
AF [name of firm]
Authors firm
AL [type [text-indent [1]]]]
Start autoincrement list
AS [arg [indent]]
Abstract start
AT title1 [title2 ...]
Authors title
AU name [initials [loc [dept [ext [room [arg [arg [arg]]]]]]]]
Author information
B [bold-text [prev-font-tex [...]]]
Begin boldface No limit on the number of arguments.
|
BE |
End bottom block |
BI [bold-text [italic-text [bold-text [...]]]
Bold-italic. No limit on the number of arguments.
BL [text-indent [1]]
Start bullet list
BR [bold-text [roman-text [bold-text [...]]]
Bold-roman. No limit on the number of arguments.
|
BS |
Bottom block start |
|||
|
DE |
Display end |
DF [format [fill [rindent]]]
Begin floating display (no nesting allowed)
DL [text-indent [1]]
Dash list start
DS [format [fill [rindent]]]
Static display start. Can now have unlimited nesting. Also right adjusted text and block may be used (R or RB as format).
EC [title [override [flag [refname]]]]
Equation title. If refname is used, then the equationnumber is saved with .SETR, and can be retrieved with .GETST refname. See BUGS for limits.
EF [arg]
Even-page footer.
EH [arg]
Even-page header.
|
EN |
Equation end. |
EQ [label]
Equation start.
EX [title [override [flag [refname]]]]
Exhibit title. If refname is used, then the exhibitnumber is saved with .SETR, and can be retrieved with .GETST refname. See BUGS for limits.
FD [arg [1]]
Footnote default format.
|
FE |
Footnote end. |
FG [title [override [flag [refname]]]]
Figure title. If refname is used, then the figurenumber is saved with .SETR, and can be retrieved with .GETST refname. See BUGS for limits.
|
FS |
Footnote start. Footnotes in displays is now possible. |
H level [heading-text [heading-suffix]]
Numbered heading.
HC [hypenation-character]
Set hypenation character.
HM [arg1 [arg2 [... [arg7]]]]
Heading mark style.
HU heading-text
Unnumbered header.
HX dlevel rlevel heading-text
Userdefined heading exit. Called just before printing the header.
HY dlevel rlevel heading-text
Userdefined heading exit. Called just before printing the header.
HZ dlevel rlevel heading-text
Userdefined heading exit. Called just after printing the header.
I [italic-text [prev-font-text [italic-text [...]]]
Italic.
IB [italic-text [bold-text [italic-text [...]]]
Italic-bold
IR [italic-text [roman-text [italic-text [...]]]
Italic-roman
LB text-indent mark-indent pad type [mark [LI-space [LB-space]]]
List begin macro.
LC [list level]
List-status clear
|
LE |
List end. |
LI [mark [1]]
List item
ML mark [text-indent]
Marked list start
MT [arg [addressee]]
Memorandom type. See above note about MT.
ND new-date
New date.
OF [arg]
Odd-page footer
OH [arg]
Odd-page header
|
OP |
Skip to odd page. |
P [type]
Begin new paragraph.
|
PE |
Picture end. |
PF [arg]
Page footer
PH [arg]
Page header
|
PS |
Picture start (from pic) |
|||
|
PX |
Page-header user-defined exit. |
|||
|
R |
Roman. |
RB [roman-text [bold-text [roman-text [...]]]
Roman-bold.
RD [prompt [diversion [string]]]
Read to diversion and/or string.
|
RF |
Reference end |
RI [roman-text [italic-text [roman-text [...]]]
Roman-italic.
RL [text-indent [1]]
Reference list start
RP [arg [arg]]
Produce reference page.
RS [string-name]
Reference start.
S [size [spacing]]
Set point size and vertical spacing. If any argument is equal ’P’, then the previous value is used. A ’C’ means current value, and ’D’ default value. If ’+’ or ’-’ is used before the value, then increment or decrement of the current value will be done.
SA [arg]
Set adjustment.
SK [pages]
Skip pages.
SM string1 [string2 [string3]]
Make a string smaller.
SP [lines]
Space vertically. lines can have any scalingfactor, like 3i or 8v.
TB [title [override [flag [refname]]]]
Table title. If refname is used, then the tablenumber is saved with .SETR, and can be retrieved with .GETST refname. See BUGS for limits.
TC [slevel [spacing [tlevel [tab [h1 [h2 [h3 [h4 [h5]]]]]]]]]
Table of contents. All texts can be redefined, new stringvariables Lifg, Litb, Liex, Liec and Licon contains "Figure", "TABLE", "Exhibit", "Equation" and "CONTENTS". These can be redefined to other languages.
|
TE |
Table end. |
TH [N]
Table header.
|
TL |
Begin title of memorandom. |
|||
|
TP |
Top of page user-defined macro. |
TS [H]
Table start
|
TX |
Userdefined table of contents exit. |
|||
|
TY |
Userdefined tbale of contents exit (no "CONTENTS"). |
VL [text-indent [mark-indent [1]]]
Variable-item list start
VM [top [bottom]]
Vertical margin.
WC [format]
Footnote and display width control.
Strings used in mm:
|
EM |
Em dash string | ||
|
HF |
Fontlist for headings, normally "2 2 2 2 2 2 2". Nonnumeric fontnames may also be used. | ||
|
HP |
Pointsize list for headings. Normally "0 0 0 0 0 0 0" which is the same as "10 10 10 10 10 10 10". | ||
|
Lf |
Contains "LIST OF FIGURES". | ||
|
Lt |
Contains "LIST OF TABLES". | ||
|
Lx |
Contains "LIST OF EXHIBITS". | ||
|
Le |
Contains "LIST OF EQUATIONS". | ||
|
Rp |
Contains "REFERENCES". | ||
|
Tm |
Contains \(tm, trade mark. |
Number variables used in mm:
|
Cl=2 |
Contents level [0:7], contents saved if heading level <= Cl | ||
|
Cp=0 |
Eject page between LIST OF XXXX if Cp == 0 | ||
|
D=0 |
Debugflag, values >0 produces varying degree of debug. A value of 1 gives information about the progress of formatting. | ||
|
De=0 |
Eject after floating display is output [0:1] | ||
|
Df=5 |
Floating keep output [0:5] | ||
|
Ds=1 |
space before and after display if == 1 [0:1] | ||
|
Ej=0 |
Eject page | ||
|
Eq=0 |
Eqation lable adjust 0=left, 1=right | ||
|
Fs=1 |
Footnote spacing | ||
|
H1-H7 |
Heading counters | ||
|
Hb=2 |
Heading break level [0:7] | ||
|
Hc=0 |
Heading centering level, [0:7] | ||
|
Hi=1 |
Heading temporary indent [0:2] 0 -> 0 indent, left margin |
1 -> indent to right , like
.P 1
2 -> indent to line up with text part of preceding
heading
|
Hs=2 |
Heading space level [0:7] |
|||
|
Ht=0 |
Heading numbering type 0 -> multiple (1.1.1 ...) |
1 -> single
|
Hu=2 |
Unnumbered heading level |
|||
|
Hy=1 |
Hyphenation in body 0 -> no hyphenation |
1 -> hyphenation 14 on
Lf=1, Lt=1, Lx=1, Le=0
Enables (1) or disables (0) the printing of List of figures, List of tables, List of exhibits and List of equations.
|
Li=6 |
List indent, used by .AL | ||
|
Ls=99 |
List space, if current listlevel > Ls then no spacing will occur around lists. | ||
|
N=0 |
Numbering style [0:5] | ||
|
Np=0 |
Numbered paragraphs. |
0 == not numbered
1 == numbered in first level headings.
|
Of=0 |
Format of figure,table,exhibit,equation titles. |
0= ". "
1= " - "
|
Pi=5 |
paragraph indent |
|||
|
Ps=1 |
paragraph spacing |
|||
|
Pt=0 |
Paragraph type. |
0 == left-justified
1 == indented .P
2 == indented .P except after .H, .DE or .LE.
|
Si=5 |
Display indent. |
It is only possible to have one title in each .DS/.DE for figures, equations, exhibits and tables. This title is always printed under the contents in the display. It is, however, possible to use these macros outside displays also.
Jörgen Hägg, Lund Institute of Technology, Sweden <jh@efd.lth.se>
/usr/local/lib/groff/tmac/tmac.m
/usr/local/lib/groff/tmac/mm*.cov
/usr/local/lib/groff/tmac/mm*.MT
groff(1),
gtroff(1), gtbl(1), gpic(1),
geqn(1)
mm(7) mmse(7)