groff
[Top][All Lists]
Advanced

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

Re: [groff] page location traps


From: Tadziu Hoffmann
Subject: Re: [groff] page location traps
Date: Thu, 25 Oct 2018 21:41:38 +0200
User-agent: Mutt/1.9.1 (2017-09-22)

> However, the nroff stderr output is unaccountably different:
> groff's implementation triggers traps 2, 4, 5, and 6,
> while Heirloom's triggers 1, 3, 4, and 6.

I just tried this with (a ported version of) Plan 9 troff, and
get the following:

  vertical resolution is 720/in / 1
  trap 1 sprung, now at 1560 u (2.166666 in), next trap in 24 u (0.033333 in)
  trap 2 sprung, now at 1680 u (2.333333 in), next trap in 48 u (0.066666 in)
  trap 4 sprung, now at 1800 u (2.500000 in), next trap in 72 u (0.100000 in)
  trap 6 sprung, now at 1920 u (2.666666 in), next trap in 6000 u (8.333333 in)

vs. groff's devps:

  vertical resolution is 72000/in / 1
  t1      151200
  t2      158400
  t3      165600
  t4      172800
  t5      180000
  t6      187200
  trap 1 sprung, now at 156000 u (2.166666 in), next trap in 2400 u (0.033333 
in)
  trap 2 sprung, now at 168000 u (2.333333 in), next trap in 4800 u (0.066666 
in)
  trap 4 sprung, now at 180000 u (2.500000 in), next trap in 7200 u (0.100000 
in)
  trap 6 sprung, now at 192000 u (2.666666 in), next trap in 600000 u (8.333333 
in)

and groff's devascii:

  vertical resolution is 240/in / 40
  t2      520
  t4      560
  t5      600
  t6      640
  trap 2 sprung, now at 520 u (2.166666 in), next trap in 40 u (0.166666 in)
  trap 4 sprung, now at 560 u (2.333333 in), next trap in 40 u (0.166666 in)
  trap 5 sprung, now at 600 u (2.500000 in), next trap in 40 u (0.166666 in)
  trap 6 sprung, now at 640 u (2.666666 in), next trap in 2000 u (8.333333 in)

For the low-resolution ascii device, the resolution limits
the number of active traps (this is the documented behavior
that one trap "conceals" another trap at the same location,
though I've never understood the rationale for this behavior).

For the high-resolution devices, it does appear as if,
of all the traps positioned within the range of the output
line's height, only the first is sprung.  Perhaps this is a
generalization of the "concealing" behavior?

(Maybe in the original troff implementation, concealing was not
implemented on purpose, but was the unintended side-effect of
the other traps in the range being skipped, and this "feature"
simply became documented.)


Attachment: pagelocationtraps.ro
Description: Text document


reply via email to

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