groff
[Top][All Lists]
Advanced

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

Re: [Groff] The \D request in nroff and troff modes


From: Werner LEMBERG
Subject: Re: [Groff] The \D request in nroff and troff modes
Date: Thu, 15 Jul 2010 18:38:21 +0200 (CEST)

>>       0     1     2
>>    +-----+-----+-----+  ...
>>    0     24    48    72 ...
>>
>> It's obvious that the values 0..23 are somehow `assigned' to
>> character cell 0, and for orthogonality we have to assign
>> position 24 already to character cell 1.
>>
>> Another complication is that everything which specifies a length is
>> rounded internally to be multiples of either \n[.H] or \n[.V].  In
>> nroff mode this means that a horizontal length of 12u is still one
>> character cell, but 13u is rounded up to be two character cells.
>
> That seems odd.  If this were pixel computer graphics then 13u may be
> rounded up to 24u but that would be a 24 pixel-long line occupying
> pixels 0 to 23 inclusive; clearly just a single character cell.

Well, groff is different :) Doing \D'l 0 0' already draws something.
You get a `+' because it is not possible to decide whether it is a
horizontal or vertical line.

Can someone check what AT&T nroff does?  Or heirloom troff?  Maybe
I've introduced some sillyness years ago and I should change groff
back so that \D'l 0 0' draws nothing and \D'l 24u 0' a single
character cell...

> I can see the issue with spotting intersections, but is the vertical
> line conceptually going down the left, middle, or right of the cell?
> Perhaps both left and right so it spots intersections on either
> side?

IMHO, a vertical line is exactly one character cell wide, this is,
24u, regardless of what you see on screen.  And yes, the code in
grotty checks intersections on both the left and right side.


    Werner

reply via email to

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