Need help with [nt]roff problem
whh%jhu.csnet at CSNET-RELAY.ARPA
whh%jhu.csnet at CSNET-RELAY.ARPA
Thu Sep 20 22:00:56 AEST 1984
From: "W.H. Huggins" <whh%jhu.csnet at CSNET-RELAY.ARPA>
You need to consider the use of that remarkable TBL preprocessor
which can be used to format text as well as tables. It has provisions
for carrying over material across page breaks, etc. The attached
memo may be of interest.
txtbls ====
Use of TBL to Format Multi-Column Text by W.H. Huggins
It is possible to use the tbl preprocessor to format text into
two, three, or more columns, side-by-side, as needed to compare two
versions of text, or to print text more compactly.
The MS macros provide a .2C command which switches the out-
put text to a two-column format at the point where the command is
given, but this format persists for the rest of the page and there
is no way using .2C to return to a one-column format before the
end of the page has been reached. The .1C command immediately
brings a new page, leaving a possibly unsightly uncompleted blank
region on the previous page following the point where the .1C
command was invoked. Furthermore, the text in the first column
must extend to the footer before the second column is begun,
whereas what is desired may be a short block of text in two column
format inserted in the middle of the page.
This difficulty can This will permit the by specifying a
be resolved by insertion of several table format with
invoking the ability blocks, side-by- three columns, using
of the TBL prepoces- side, as has been the standard format
sor to format ordi- done here specifications,
nary text into
blocks. or possibly to have the text of one block
span the widths of two prior blocks, etc.,
all in accord with the formatting specifications used in creating
tables as described in the report _T_B_L - _A _P_r_o_g_r_a_m _t_o _F_o_r_m_a_t _T_a_b_l_e_s
by M.E. Lesk. (See the V7 UNIX documentation available in the EE
Dept office.)
The source text for TBL used to produce the above multicolumn
listing is shown on the next page. Notice that the "expand"
option will expand the intercolumn space to correspond to the line
length -- but this includes the space at the end of the third
column! Hence, the line length is expanded temporarily so that the
actual text is even with the right margin of the text. (The
default column separation is 3 ens). This space at the end of the
text of the third column would have been needed had the table been
boxed.
.ll +3n
.TS
expand;
l l l
l l s .
T{
.ll 2i
This difficulty can be resolved by invoking the
ability of the TBL prepocessor to format ordinary
text into blocks.
T} T{
.ll 2i
This will permit the insertion of
several blocks, side-by-side,
as has been done here
T} T{
.ll 2i
by specifying
a table format with
three columns, using the
standard format specifications,
T}
T{
.ll 4.25i
or possibly to have the text
of one block span the widths of two prior blocks,
etc.,
T}
.ad
.TE
.ll -3n
More information about the Comp.unix
mailing list