> 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.)
.\" .\" ---------------------------------------------------------------- .nr v 1i .tm vertical resolution is \nv/in / \n(.V .de >i .nr x \\$1 .nr j 0\\$2 .nr i \\nx/\\nv .ie \\nj .ds i \\*i\\ni .el .ds i \\ni. .nr x (\\nx-(\\ni*\\nv))*10 .nr j \\nj+1 .if \\nj<7 .>i \\nx \\nj .. .de x .>i \\n(.d .ds tp \\*i .>i \\n(.t .ds nt \\*i .tm trap \\$1 sprung, now at \\n(.d u (\\*(tp in), next trap in \\n(.t u (\\*(nt in) .. .de t1 .x 1 .. .de t2 .x 2 .. .de t3 .x 3 .. .de t4 .x 4 .. .de t5 .x 5 .. .de t6 .x 6 .. .wh 2.1i t1 .wh 2.2i t2 .wh 2.3i t3 .wh 2.4i t4 .wh 2.5i t5 .wh 2.6i t6 .ptr .nf 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20