groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Groff] A trap with 'tbl'!


From: Ted Harding
Subject: Re: [Groff] A trap with 'tbl'!
Date: Sun, 31 Jul 2011 15:19:36 +0100 (BST)

On 31-Jul-11 13:10:36, Denis M. Wilson wrote:
> Hello Ted,
> 
> On Fri, 29 Jul 2011 22:25:59 +0100 (BST)
> (Ted Harding) <address@hidden> wrote:
> 
>> Greetings All!
>> I'm writing to flag up a little trap that one might
>> fall into when using 'tbl'.
>> 
>> Background: I'm setting up a table and I want each
>> row to have a row number to the left of the table.
>> (etc)
> 
> Even with the corrections given by various respondents,
> the result does not work for me: the title row is numbered,
> but the last row on each page is not. I couldn't fix this,
> but if it is only the signature lines which are to be numbered,
> you could omit the \v'-1.5m' from your definition, as this
> puts the number on the *previous* line. Why -1.5m anyway?
> Is this documented in tbl? Is m not a measure of horizontal
> distance? The amount should be an upwards movement of 1v
> plus the space taken up by the horizontal line (I couldn't
> find a definition of this).
> 
> Best wishes,
> Denis

Hi Denis,
I have to confess (yet again) to an inadvertent omission in
my first post which probably gave rise to your question.
In my later post I gave the full code as far as it is relevant.
Here it is again:

.vs 5m
.ds lmn \Z'\v'-1.5m'\h'-\w'\\n+[lmno]\0\0\0\0\0'u'\\n[lmno]'
.nr lmno 0 1
.nr FM \n[FM]+5m
.TS H
expand tab(#);
ce cw(2.0i) ce.
Name (in Capitals)#Address#Signature
_
.TH
.T&
|l |l |l|.
.nr lmno 0 1
\*[lmn]
_
\*[lmn]
_
\*[lmn]
_
\*[lmn]
_
\*[lmn]
_
\*[lmn]
_
.TE

Notice the ".vs 5m" at the start. This makes each box
adequate to contain a vertical space of 5m. This is to
allow space for people to write their names, addresses
and signatures.

Then, without the "\v'-1.5m'" in the definition of \*[lmn],
the row number would be level with the bottom of the box
(i.e. just above the horizontal line). With the "\v'-1.5m'",
the row number at the side is pretty well vertically centred
between the top and bottom of the box.

As you observed, without taking some step to increase the
height of the box, the "\v'-1.5m'" will lift the number to
the level of the line above, since each box is then only 1v,
plus a bit, in height.

Sorry to have caused confusion!
Ted.

--------------------------------------------------------------------
E-Mail: (Ted Harding) <address@hidden>
Fax-to-email: +44 (0)870 094 0861
Date: 31-Jul-11                                       Time: 15:17:54
------------------------------ XFMail ------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]