[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #61116] [troff] clamp output line length to horizontal resolution
From: |
G. Branden Robinson |
Subject: |
[bug #61116] [troff] clamp output line length to horizontal resolution |
Date: |
Sat, 4 Sep 2021 12:52:17 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0 |
URL:
<https://savannah.gnu.org/bugs/?61116>
Summary: [troff] clamp output line length to horizontal
resolution
Project: GNU troff
Submitted by: gbranden
Submitted on: Sat 04 Sep 2021 04:52:15 PM UTC
Category: Core
Severity: 3 - Normal
Item Group: Incorrect behaviour
Status: In Progress
Privacy: Public
Assigned to: gbranden
Open/Closed: Open
Discussion Lock: Any
Planned Release: None
_______________________________________________________
Details:
This issue arose during analysis of bug #61089.
Observe the following Heirloom Doctools troff behavior.
$ cat ll.roff
.tm horizontal resolution .H is \n(.Hu
.nr ll 49u
.de m1
. ll \\n(llu
. tm ll: \\n(llu; .l: \\n(.lu
. nr ll -1
. if \\n(llu>=0 .m1
..
.m1
$ ./bin/nroff ./ll.roff
horizontal resolution .H is 24u
ll: 49u; .l: 48u
ll: 48u; .l: 48u
ll: 47u; .l: 48u
ll: 46u; .l: 48u
ll: 45u; .l: 48u
ll: 44u; .l: 48u
ll: 43u; .l: 48u
ll: 42u; .l: 48u
ll: 41u; .l: 48u
ll: 40u; .l: 48u
ll: 39u; .l: 48u
ll: 38u; .l: 48u
ll: 37u; .l: 48u
ll: 36u; .l: 24u
ll: 35u; .l: 24u
ll: 34u; .l: 24u
ll: 33u; .l: 24u
ll: 32u; .l: 24u
ll: 31u; .l: 24u
ll: 30u; .l: 24u
ll: 29u; .l: 24u
ll: 28u; .l: 24u
ll: 27u; .l: 24u
ll: 26u; .l: 24u
ll: 25u; .l: 24u
ll: 24u; .l: 24u
ll: 23u; .l: 24u
ll: 22u; .l: 24u
ll: 21u; .l: 24u
ll: 20u; .l: 24u
ll: 19u; .l: 24u
ll: 18u; .l: 24u
ll: 17u; .l: 24u
ll: 16u; .l: 24u
ll: 15u; .l: 24u
ll: 14u; .l: 24u
ll: 13u; .l: 24u
ll: 12u; .l: 24u
ll: 11u; .l: 24u
ll: 10u; .l: 24u
ll: 9u; .l: 24u
ll: 8u; .l: 24u
ll: 7u; .l: 24u
ll: 6u; .l: 24u
ll: 5u; .l: 24u
ll: 4u; .l: 24u
ll: 3u; .l: 24u
ll: 2u; .l: 24u
ll: 1u; .l: 24u
ll: 0u; .l: 24u
The output line length is not permitted to be less than the output device's
horizontal resolution, and moreover it is not allowed to be zero.
groff has, historically, permitted this, but it does not appear to have been a
deliberate design decision. The code was not written to handle this case (see
bug #61089 and bug #44018).
John Gardner found himself exploring in this part of the design space, as
shown in bug #61089.
If we're going to define semantics for an output line length of zero as a
groff extension, we should do so after consulting the mailing list and in
conjunction with appropriate documentation. That'll be a separate ticket.
For now, we should make groff behave like Heirloom Doctools (unless I find
enough contradictory practice in other implementations, but that will take a
bit of time).
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?61116>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [bug #61116] [troff] clamp output line length to horizontal resolution,
G. Branden Robinson <=