The first
example shows an equation that can be processed by eqn:
.EQ
a ~ mark = ~ 30
.EN
.sp
.EQ
a sup 2 ~ + ~ b sup 2~lineup = ~ 1000
.EN
.sp
.EQ
x sup 3 ~ + ~ y sup 3 ~ + ~ z sup 3~lineup = ~ 1400
.EN
If this appeared in a memo called memoeqn.mm, the memo would be preprocessed by eqn and
then sent to the printer using the following command:
$ groff -Tps -l -mm -e memoeqn.mm
All data between the .EQ and .EN macros are interpreted as equations. The resulting output from
the equation would appear as shown in Figure 21-7.
567
Working with Words and Images 21
FIGURE 21-7
Produce equations in documents with the use of the eqn command??™s .EQ and .EN macros.
To create a table in a Groff document, use the .TS and .TE macros of the tbl preprocessor. The following
is an example of the markup used to produce a simple table:
.TS
center, box, tab(:);
c s s
c | c | c
l | l | l.
Mergers and Acquisitions Team
=
Employee:Title:Location
=_
Jones, James:Marketing Manager:New York Office
Smith, Charles:Sales Manager:Los Angeles Office
Taylor, Sarah:R&D Manager:New York Office
Walters, Mark:Information Systems Manager:Salt Lake City Office
Zur, Mike:Distribution Manager:Portland Office
.TE
The .TS macro starts the table, and the next line indicates that the table should be centered on the
page (center) and surrounded by a line box and that a colon will be used to separate the data
into cells (tab(:)).
Pages:
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077