[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] Tips & Tricks: Tables with abutting rules
From: |
Ingo Schwarze |
Subject: |
Re: [Groff] Tips & Tricks: Tables with abutting rules |
Date: |
Thu, 7 Jul 2011 20:59:32 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Hi Werner,
Werner LEMBERG wrote on Thu, Jul 07, 2011 at 08:09:23PM +0200:
> Ingo Schwarze wrote:
>> Werner Lemberg wrote:
>>> Ted Harding wrote:
>>>> There is no 'tbl' option which allows a "no space" to be set in
>>>> this context. However, there is a trick. This is to use dummy
>>>> columns at the left and/or right, with associated zero column
>>>> spacings. [...]
>>> Very nice! Could you convert this small tutorial into something
>>> which I can add to the tbl manpage?
>> Ugh. This looks like an extremely ugly hack abusing tbl(1) in a way
>> it was never meant to be used.
> ??? I strongly disagree.
This was strongly overstated due to the misunderstanding below,
but it still doesn't seem very robust across output devices
even with groff-1.21:
$ /usr/local/bin/tbl colspace.tbl | /usr/local/bin/nroff -Tascii -c
| two words |
and three words|
Note that even newest and shiniest grotty produces an unintended
one-column indent and hides the left border line behind the text.
That _is_ the consequence of using an edge case feature, i think.
Compared to the standard '|c|' as given by Ted:
$ /usr/local/bin/tbl col.tbl | /usr/local/bin/nroff -Tascii -c
| two words |
|and three words |
... which looks just fine.
>> In general, you are better off in programming if you avoid using
>> counter-intuitive quirks near the borders of languages (in this case,
>> empty columns and mixing low-level roff with high-level tbl).
> Where is low-level roff? In the table shown by Ted, namely
>
> .TS
> tab(#);
> r0|c0|l.
> #two words#
> #and three words#
> .TE
>
> I only see high-level tbl code.
Err, yes, sorry for the confusion, i somehow misread the
comparison roff code as part of the example.
So that part is settled.
Yours,
Ingo
Re: [Groff] Tips & Tricks: Tables with abutting rules, Ted Harding, 2011/07/07