|
From: | Chuck Jungmann |
Subject: | nroff mode paging inconsistencies |
Date: | Fri, 10 May 2024 13:17:28 -0500 |
User-agent: | Mozilla Thunderbird |
The alleged (maybe I don't understand something) inconsistencies pertain to values of various registers. The register for page offset (\n[.o]) always reports a 0 value, as one would expect for an unpaged document. I eventually figured out that I was near the bottom of a page by using the .mk action, which does report a vertical offset from a given page (though not the same value as \n[.o] in a document formatted with troff). Comparing the .mk value with the page height register (\n[.p]), I could see that my formatting problem occurred when I attempted to .sp up to a line that was printed before a phantom page break.
Using .mk to isolate the problem also suggests a work-around. Use the value reported by .mk in place of the page offset register. Easier still would be to detect nroff mode and if in nroff, just issue a .bp before every multi-line object since .bp seems to have no effect on the output beyond resetting the position reported by the .mk action.
I sent this bug report to make a record of the issue in case it helps someone diagnose and work-around a similar problem. I'm not sure if this is something you would work on. In reading the 10-year-old mission statement, this issue doesn't apply to either of the two areas of development. If you want more information, I would be happy to provide more information and a simplified roff-script to manifest the problem.
I'm not sure how you'd fix it, and maybe you can't. Having a page offset from the top of the document risks integer overflow, especially with troff output where the my pdf line height is 12,000 basic units, so I can see an argument for having virtual pages to limit the internal page offset value as reported by .mk.
[Prev in Thread] | Current Thread | [Next in Thread] |