bugGNU roff - Bugs: bug #61386, [man] TH 'extra2' argument can...

 
 

bug #61386: [man] TH 'extra2' argument can overrun center footer

Submitter:  G. Branden Robinson <gbranden>
Submitted:  Tue 26 Oct 2021 05:01:55 AM UTC
   
 
Category:  Macro man Severity:  3 - Normal
Item Group:  Rendering/Cosmetics Status:  Fixed
Privacy:  Public Assigned to:  gbranden
Open/Closed:  Closed Planned Release:  1.23.0
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 26 Oct 2021 12:50:39 PM UTC, comment #4: 

Hrm, I think a stale browser tab forced this ticket open again.  Annoying.

G. Branden Robinson <gbranden>
Group administrator
Tue 26 Oct 2021 12:49:40 PM UTC, comment #3: 

Hi Deri,

comment #2:

> Seems to me this is not a groff problem, but a weakness in the way the man7 site generates the pages. If you choose to deliver the pages as linked pdfs (rather than html), the problem is not present.


But the problem eventually crops up even at -rLL=78n or even wider lengths.  Given any line length, a fourth argument to .TH can be contrived that will cause a problem.  And not all such contrivances will be willfully perverse.  "groff" is a fairly short project name and in this era of "Git versions", I expect version numbers to be as garrulous as ours can be.

> This is a problem with the workflow generating the pages. I don't understand why the line length is set to 72 characters when most webpages are considerably wider. Use 82 characters and the problem in your example disappears. Why make this change if the "problem" is external to groff. The 72 char limit is related to punch cards (the last 8 chars were for a sequence number (if you bothered - should see me trying to use a hand punch!!!)
>
> (file #52158)


I'm a little too young to have dealt with punch cards, but I remember computer video displays with 64 or 32 characters per line...

Speaking of linked PDFs, how do I embed a hyperlink so that gropdf will handle it?  I don't see anything in gropdf(1) about this.

Regards,
Branden

G. Branden Robinson <gbranden>
Group administrator
Tue 26 Oct 2021 12:26:50 PM UTC, comment #2: 

Seems to me this is not a groff problem, but a weakness in the way the man7 site generates the pages. If you choose to deliver the pages as linked pdfs (rather than html), the problem is not present. This is a problem with the workflow generating the pages. I don't understand why the line length is set to 72 characters when most webpages are considerably wider. Use 82 characters and the problem in your example disappears. Why make this change if the "problem" is external to groff. The 72 char limit is related to punch cards (the last 8 chars were for a sequence number (if you bothered - should see me trying to use a hand punch!!!)

(file #52158)

Deri James <deri>
Group Member
Tue 26 Oct 2021 11:38:04 AM UTC, comment #1: 


commit 8578254c09b9fd66cad59353caae479240037cbf
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Tue Oct 26 16:15:32 2021 +1100

    [man]: Abbreviate the inside footer if necessary.

    * tmac/an.tmac (an-prepare-inner-footer): Prevent the inside footer from
      overrunning the center footer.

      (BT): Use new string `an-ifoot` instead of `an-extra2` in page
      footers.

    Fixes <https://savannah.gnu.org/bugs/?61386>.


G. Branden Robinson <gbranden>
Group administrator
Tue 26 Oct 2021 05:01:55 AM UTC, original submission:  

Man page titles are abbreviated in groff man(7) (see bug #43532), so in all but the most pathological cases the default page header is unlikely to overprint itself.

This is not true of footers.

On Michael Kerrisk's site man7.org, we can see examples of the TH 'extra2' argument overrunning the date in the center footer, and groff's own man pages exhibit this poor behavior.

https://man7.org/linux/man-pages/man7/groff_char.7.html

We see:


groff 1.23.0.rc1.654-4e1db-dir1t9yAugust 2021                groff_char(7)


(Something I noticed only when copy-and-pasting this is that backspace characters (ASCII 8) are embedded in it.  These appear to be produced by grotty(1).  That's weird, but it seems to follow from character composition by overstriking being permitted even on SGR-enabled devices.  In any case, in testing my fix for this problem, backspaces do not occur in the output if the left footer is successfully abbreviated.)

(This HTML version of the page was generated by postprocessing groff -Tutf8 output, as can bee seen by the page's own disclosure of the selected output device.)

The instant problem is exacerbated by man7.org's use of a dirty Git checkout, but even without that, our git-version strings have gotten pretty unwieldy--my tree right now has:

groff 1.23.0.rc1.1449-84949

We should abbreviate such material in a similar manner as we do for certain Erlang man page titles.

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:
   

Attached Files
file #52158:  example.pdf added by deri (45KiB - application/pdf - Example of "Dirty")

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by deri (Updated the item)
  • -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 10 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-10-26 gbranden StatusIn Progress Fixed
        Open/ClosedOpen Closed
        Planned ReleaseNone 1.23.0
    2021-10-26 deri Attached File- Added example.pdf, #52158
        StatusFixed In Progress
        Open/ClosedClosed Open
        Planned Release1.23.0 None
    2021-10-26 gbranden StatusIn Progress Fixed
        Open/ClosedOpen Closed
        Planned ReleaseNone 1.23.0

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code