bugGNU roff - Bugs: bug #64300, [troff] decide what to do when 'sp...

 
 

bug #64300: [troff] decide what to do when 'sp used when not on a page

Submitter:  G. Branden Robinson <gbranden>
Submitted:  Mon 12 Jun 2023 09:31:41 PM UTC
   
 
Category:  Core Severity:  3 - Normal
Item Group:  Warning/Suspicious behaviour Status:  Need Info
Privacy:  Public Assigned to:  None
Open/Closed:  Open Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 22 Jun 2023 03:03:35 AM UTC, comment #5: 

Revising summary.  DWB/Heirloom Doctools troff compatibility would be nice here.  But how hard would it be?

G. Branden Robinson <gbranden>
Group administrator
Fri 16 Jun 2023 05:23:53 PM UTC, comment #4: 


comment #3:

> comment #2:
> > saying "'sp -3v' while the page location (`nl` register) is negative
>
> s/-//
> (presumably, as that's what the cited example uses)


Right, thanks.

G. Branden Robinson <gbranden>
Group administrator
Fri 16 Jun 2023 11:22:27 AM UTC, comment #3: 

comment #2:

> saying "'sp -3v' while the page location (`nl` register) is negative


s/-//
(presumably, as that's what the cited example uses)

Dave <barx>
Group Member
Fri 16 Jun 2023 03:41:05 AM UTC, comment #2: 


comment #1:

> Does either behavior offer functionality that can't easily be achieved in a roff implementation that does the opposite?  I can't think of any.
>
> If there's no strong use case for either approach, in general I tend to prefer seeing consistent behavior across implementations.  That does (probably) overturn longstanding groff behavior though, albeit undocumented behavior.


Apart from the rule of thumb that we should be compatible with other *roffs except where we have a defensible case not to be, I think this would address one application of the "absolute page positioning operator" that Peter Schaffter has raised.

If you inspect the exhibits in comment #0, you can see that saying "'sp -3v' while the page location (`nl` register) is negative puts the text baseline "_at_ 3v, damn it", without having to compensate for the 1v offset that Peter has complained of when using the "|" operator.

Looping in Peter for this reason.

G. Branden Robinson <gbranden>
Group administrator
Tue 13 Jun 2023 02:12:36 PM UTC, comment #1: 

Does either behavior offer functionality that can't easily be achieved in a roff implementation that does the opposite?  I can't think of any.

If there's no strong use case for either approach, in general I tend to prefer seeing consistent behavior across implementations.  That does (probably) overturn longstanding groff behavior though, albeit undocumented behavior.

Dave <barx>
Group Member
Mon 12 Jun 2023 09:31:41 PM UTC, original submission:  


$ cat EXPERIMENTS/no-break-sp-request-behavior-exhibit.roff
'sp 3v \" does nothing because not on a page yet: diagnose error?
foo
.br
bar
'sp 3v
baz
$ nroff EXPERIMENTS/no-break-sp-request-behavior-exhibit.roff | cat -n | head
     1  foo
     2
     3
     4
     5  bar baz
     6
     7
     8
     9
    10


The formatter sullenly ignores a no-break `sp` request if the vertical drawing position is negative.

This is not what DWB or Heirloom Doctools nroff do.


$ ./bin/nroff ./no-break-sp-request-behavior-exhibit.roff | cat -n | head
     1
     2
     3  foo
     4
     5
     6  bar baz
     7
     8
     9
    10


We should either align with them or throw an error and document the difference.

G. Branden Robinson <gbranden>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by gbranden (mom author and advocate of absolute motion operator)
  • -email is unavailable- added by barx (Posted a comment)
  • -email is unavailable- added by gbranden (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-06-22 gbranden StatusNone Need Info
        Summary[troff] diagnose error when 'sp used when not on a page [troff] decide what to do when 'sp used when not on a page
    2023-06-16 gbranden Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code