groff
[Top][All Lists]
Advanced

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

RE: [Groff] tbl problem


From: Ted Harding
Subject: RE: [Groff] tbl problem
Date: Wed, 14 Nov 2001 19:17:49 -0000 (GMT)

On 14-Nov-01 Werner LEMBERG wrote:
> 
> Consider the following table (note the starting `.sp'):
> [snip]
> This produces:
> 
> Two problems:
> 
>   . Note the ugly `|' in the first line.  Does UNIX tbl produce a
>     similar result?  I would like to get rid of the superfluous `|'.
> 
>   . Without the leading `.sp', grotty produces a warning
> 
>       grotty:tbl:232: character above first line discarded
> 
>     and discards the first line.  I think this is not good behaviour.
>     grotty is right, and tbl should be fixed.

Werner: Please do not jump too quickly to this conclusion
(that grotty is right and tbl should be fixed).

With or without ".sp", the "tbl" code works perfectly for
devps ("-Tps"). The output of "tbl" contains two drawing
commands ("\D"):

.sp -1
\v'.25m'\h'\n[3cd3]u'\s[\n[3lps]]\D'l 0 |\n[3rt0]u-1v'\s0

and, further down,

.ls 1
\v'.25m'\s[\n[3lps]]\h'|\n[3cd0]u'\D'l |\n[3cd6]u 0'\s0

I think the first of these draws the short vertical line above
the horizontal line, and the second draws the vertical line
down to the bottom of the table. The first operates by
moving down 0.25m from the line above the current line.

I also think that the effect observed with 'grotty' is
due to the fact that grotty will insert a whole vertical
bar character even when only a fraction of a vertical bar
is called for, whereas the fractional vertical line is
needed with graphical output (e.g. PS, dvi) in order to
have a line going from the top of the current line "strip",
which is of course a fraction of a "VS" above the top
of the characters.

So, if anything, it's rather the behaviour of grotty
which needs revising, in my opinion -- unless a detailed
analysis shows that the behaviour of tbl is indeed anomalous.

By the way, there are no warnings with "-Tps", with or
without ".sp".

Whatever the truth about the effect observed with grotty
might be, PLEASE do not contemplate any changes which
might spoil the behaviour for "-Tps"!

Since, apparently, 'tbl' is not aware of which device
will be used, fixing this within 'tbl' involves restructuring
the way 'tbl' constructs its output (particularly the line
drawing). This would mean outputting a line like

\v'.25m-1v'\h'\n[3cd3]u'\s[\n[3lps]]\D'l 0 |\n[3rt0]u-1v'\s0

and even then 'grotty' would have to be told to ignore
the fraction of the line sticking out above the current
line: if I have it right, 'grotty' "rounds up" fractional
lines to character-size units, while what is needed to
correct this behaviour is "rounding down".

Furthermore, the "error" "character above first line discarded"
only arises because, as you gave the example, this character
occurs in line (-1), i.e. the first "real" line of the
table is "line 0" of the document. If you use a macro
package (e.g. -ms) which puts a header margin in, then
you do not get this behaviour. Even if you merely put
a line of text ("This is text") preceding ".TS", it
still does not occur (but then you do get "|" on the
same line as "This is text").

Best wishes to all
Ted.

--------------------------------------------------------------------
E-Mail: (Ted Harding) <address@hidden>
Fax-to-email: +44 (0)870 167 1972
Date: 14-Nov-01                                       Time: 19:17:49
------------------------------ XFMail ------------------------------

reply via email to

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