On 07-Feb-07 Michael(tm) Smith wrote:
> [...]
> Well, then I'd really like to have some general solution
> (workaround) that would cause the cell widths in tables with any
> arbitary number of columns to set to something more reasonable
> than what tbl(1) currently does.
> 
> I don't know actually know if TQ solves that problem. But I'd sure
> like to have something better -- regardless of how it it's
> implemented.
> 
>   --Mike

As well as "w(...)" in the table header itself, you can also
use ".ll" inside a text block. For example, compare

.TS
tab(#);
l l l l.
Line 1#Field 2#Field 3#Comment 1
.T&
l l s l.
Line 2#T{
This will be quite a large block of text,
which is likely to spread over several lines,
and we would like to see what tbl does to it
under various circumstances.
T}#Comment 2
.T&
l l l l.
Line 3#Field 2#Field 3#Comment 3
.TE

with

.TS
tab(#);
l l l l.
Line 1#Field 2#Field 3#Comment 1
.T&
l l s l.
Line 2#T{
.ll 3i
This will be quite a large block of text,
which is likely to spread over several lines,
and we would like to see what tbl does to it
under various circumstances.
T}#Comment 2
.T& 
l l l l.
Line 3#Field 2#Field 3#Comment 3
.TE

You can equally well use it to narrow a column to less than
the default (e.g. try ".ll 1.5i" above), which would not work
with the "w(i.5i)" approach sone the "w" modifier only sets
a minimum column width, which would be over-ridded by the
larger default textblock width!

(And I've deliberately shown an example where the text block
spans 2 columns with a normal line above it and below it,
where you can't conveniently set its width using "w" on the
two colimns which it spans).

One advantage of the ".ll" approach is that you can use an
arbitrary (provided it's valid) numerical expression to set
its value, so complicated expressions (like Gunnar Ritter's

  lw(\n(.lu/10u) lw(\n(.lu*9u/10u).

which would not work for classic troff at least) can be used.

Best wishes,
Ted.

--------------------------------------------------------------------
E-Mail: (Ted Harding) <[EMAIL PROTECTED]>
Fax-to-email: +44 (0)870 094 0861
Date: 07-Feb-07                                       Time: 17:49:11
------------------------------ XFMail ------------------------------

--------------------------------------------------------------------
E-Mail: (Ted Harding) <[EMAIL PROTECTED]>
Fax-to-email: +44 (0)870 094 0861
Date: 07-Feb-07                                       Time: 18:10:50
------------------------------ XFMail ------------------------------


Reply via email to