[Top][All Lists]

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

RE: [Groff] [Tbl]Controlling line thickness in tbl

From: Ted Harding
Subject: RE: [Groff] [Tbl]Controlling line thickness in tbl
Date: Fri, 30 Nov 2001 10:15:26 -0000 (GMT)

On 29-Nov-01 George, Russell A wrote:
> Can the thickness of individual lines be controlled in tbl.

Up to a point.

For the horizontal lines it is fairly straightforward.

First, I think (where PS output is concerned) that it
is worth while setting the "linecap" to 0 (i.e. square
ends not projecting). [Also see comment below.]

Next, you can change the line thickness of succeeding
horizontal lines by planting a \D't ...' in the table.

Try the following:

\X'ps: exec 0 setlinecap'
c c c c.
a#b#c#d\D't 3000u'\h'-3000u'
a#b#c#d\D't 100u'\h'-100u'

This works because the horizontal lines in the table are
drawn where they are encountered, so you can plant a thickness
change where you need it.

However, this will not work for vertical lines: these are
drawn from top to bottom in left-to-right order after everything
else has been drawn, so I don't see any direct way to intervene
and make them of different thicknesses.

It would in theory be possible to make the change by following
'tbl' in the groff pipeline with a program which could intercept
the output of 'tbl', recognise certain user-defined tags, and
then trap the "\Dl...'" commmands which draw the lines and
embed them in line-thickness changes on the lines of the above.

However, doing this would not be trivial!

COMMENT: By default, the linecap type is "1" -- i.e. rounded
ends of radius half the line thickness. PS has three linecap types:

0: square ends at the defined endpoint of the line
1: round ends (as above)
2: square ends projecting half a line thickness beyond the endpoint.

In my view, linecap=1 is not globally appropriate for tables; it is
particularly suited for smooth joins of line which meet at an angle
other than a right-angle. Since the lines in tables meet at right
angles, this is not needed _except_ in those few places where two
lines form a corner. Usually this is at the corners of an overall

So long as all the lines are the same thickness, linecap=1 does not
matter much (though if the lines were thick you would see rounded
corners). However, if you are going to change line thickness then
the round cap of horizontal lines will project beyond thinner
vertical lines which pass through their ends, making little bumps.

I think there is scope for a more sophisticated approach to linecap
type in groff, and indeed for a more flexible approach to line
thickness in 'tbl'.

I hope the above is helpful.

E-Mail: (Ted Harding) <address@hidden>
Fax-to-email: +44 (0)870 167 1972
Date: 30-Nov-01                                       Time: 10:15:26
------------------------------ XFMail ------------------------------

reply via email to

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