groff
[Top][All Lists]
Advanced

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

Re: vertical spacing trivia challenge


From: Tadziu Hoffmann
Subject: Re: vertical spacing trivia challenge
Date: Mon, 15 Jul 2024 01:06:55 +0200
User-agent: Mutt/1.11.4 (2019-03-13)


[Spoilers ahead.]

> A   Question: is the `vs` request (which sets the vertical spacing)
>     honored in nroff mode?

Yes.

> B.  In nroff (or nroff mode in groff), what _units_ is the argument
>     to the `vs` request reckoned in?

I remember .vs always being given in points, with a default value of
12 pt, resulting in 6 lines per inch, or 66 lines per 11-inch sheet.

(I know this because I have set my terminal windows to a height of
67 lines, in order to display manual entries paginated for 11-inch
fan-fold line printer paper one page at a time, with an additional
line for the "less" prompt.)

Empirical tests with groff support this.  However, groff appears to
round different values for .vs immediately to a multiple of 12 pt,
and then consistently use that rounded number.  E.g.,

  echo -e '.sp 12p\n.nf\n.vs 6\na\nb\nc\nd' | nroff | less

only shows "d", i.e., 6 gets rounded down to zero.

[This is in contrast to a conceivable different model, in which
groff might internally keep a higher-resolution line tally, and
output a linefeed only when this surpasses the next grid position.]

> C.  A point is less than a vee, right?

Usually, but the vee can also be set to zero for special
formatting purposes.

> D.  What does nroff do if you request to alter the vertical
>     spacing in points?

Not sure what is meant here.  I think it is always in points.
Or do you mean, if different values than the default are
requested?  Then, see above.

> E.  Attempt to address the foregoing questions empirically.
>     Compare the results to the claims of CSTR #54.
>     Do they agree?

[Now browsing CSTR #54...]
I can't see anything beyond it stating that the default scale
indicator for .vs is points, and that nroff rounds numerical
input to the actual resolution of its output device.
So I would say yes, they agree.  :-)


However: I remember Unix nroff also supporting terminals with
half-line capability, which groff doesn't.  Maybe someone here
has an old system they can use to test nroff's behavior when
formatting for one of these terminals?






reply via email to

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