bug-groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #61954] [man] customizable `PT` and `BT` macros are not flexible en


From: G. Branden Robinson
Subject: [bug #61954] [man] customizable `PT` and `BT` macros are not flexible enough
Date: Fri, 28 Jan 2022 13:31:22 -0500 (EST)

URL:
  <https://savannah.gnu.org/bugs/?61954>

                 Summary: [man] customizable `PT` and `BT` macros are not
flexible enough
                 Project: GNU troff
            Submitted by: gbranden
            Submitted on: Fri 28 Jan 2022 06:31:20 PM UTC
                Category: Macro man
                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 consequent to a
groff mailing list exchange with Alejandro Colomar
<https://lists.gnu.org/archive/html/groff/2022-01/msg00050.html>.

The customizable `PT` and `BT` macros, called by header and
footer traps, are not flexible enough.

A custom `PT` trap doesn't kick in until the second page because
we tell people not to redefine it until after `TH`, but by then
it is too late because `TH` causes the header trap to be
sprung.

Input:


$ cat EXPERIMENTS/two-pages-no-titles.man
.TH foo 1 2022-01-29 "groff foo test suite"
.de PT
.tl 'ABC'DEF'GHI'
..
.de BT
.tl 'JKL'MNO'PQR'
..
.SH Name
foo \- frobnicate a baz
.TH bar 1 2022-01-29 "groff bar test suite"
.SH Name
bar \- masticate a qux


groff 1.22.4 output:


$ nroff -man EXPERIMENTS/two-pages-no-titles.man
foo(1)                      General Commands Manual                    
foo(1)



Name
       foo - frobnicate a baz



ABC                                   DEF                                 
GHI



Name
       bar - masticate a qux



JKL                                   MNO                                 
PQR



(The page footer for the foo(1) page was not written either.
That was bug #60609, fixed last May in groff Git HEAD.)

(The extra lines in the output are bug #60653, fixed last June
in groff Git HEAD.)

The "obvious" fix is to redefine `PT` before calling `TH`.

But it doesn't work in groff 1.22.4.

In groff Git HEAD, the package misbehaves differently; instead
the header on the first page (only) goes missing.

If we use the `-mandoc` option, instead of `-man`, the page
header on the second page reverts to the man(7) default!

I'm working on a fix.





    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?61954>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]