#1090987 groff-base: unhappy with mdoc Dt macro rendering in nroff mode since 1.23

Package:
groff-base
Source:
groff-base
Description:
GNU troff text-formatting system (base system components)
Submitter:
наб
Date:
2025-12-15 17:39:05 UTC
Severity:
normal
Tags:
#1090987#5
Date:
2023-12-27 19:21:19 UTC
From:
To:
Dear Maintainer,

This isn't about the many other font changes, especially the troff ones
(though changing Cm/Fl to CR from CB in troff mode
 is basically violence against the user,
 and changing Pa from C to I and Xr from B to nothing is awful)
because I'm the only psycho who actually renders PDFs and can patch this,
or even the other nroff font changes
(Sx I->Dq is weird, especially contrasted with Xr R->I
 (which I'm not gonna complain too much about but it is odd;
  you don't need any font because there's a big sexion specifier there);
 I might even agree with Li R->B);
(it would be nice if reversions were provided by default
 or with an easy opt-in in Debian I've personally been using
   .\" Comparing groff-base 1.23.0-3 with 1.22.4-10
   .\" Based on https://paste.sr.ht/~nabijaczleweli/e897d091aa5b62c284c6c996d90253023b6271f7
   .\"
   .\" 1.23 effectively aliases Sx to Dq. undo this
   .als Sx doc-generic-macro
   .ds doc-Sx-usage section_header
   .
   .ie n \{ .
   .\" doc-nroff
   .ds doc-Li-font \f[R]
   .\"             \f[B] in 1.23
   .
   .ds doc-Sx-font \f[I]
   .\"             dropped in 1.23
   .
   .ds doc-Xr-font \f[R]
   .\"             \f[I] in 1.23
   . \}
   .el \{ .
   .\" doc-ditroff
   .ds doc-Sx-font \f[B]
   .\"             dropped in 1.23
   .
   .ds doc-Xr-font \f[C]
   .\"             \f[I] in 1.23
   .
   .ds doc-page-topic-font \f[R]
   .\"                     \f[I] in 1.23; used to be called doc-caption-font
   .
   .ds doc-Cm-font \f[CB]
   .\"             \f[CR] in 1.23
   .
   .ds doc-Fl-font \f[CB]
   .\"             \f[CR] in 1.23
   .
   .ds doc-Pa-font \f[C]
   .\"             \f[I] in 1.23
   . \}
 since, commit date says, 2023-11-14)
this is about the two "obviously-broken" changes.

1:
The first invocation of Nm in NAME is broken:
it correctly saves the first argument to the string register,
but it draws the argument in R instead of B.
This is in contrast to every other use of Nm
(and, thus, every other reference to the object the Nms refer to).
This is baffling and confusing; please revert this
(a quick peep at
https://sources.debian.org/src/groff/1.23.0-3/tmac/doc.tmac/#L1166
 shows that this is an explicit change).

This is much harder to correct (I'd say impossible) for a casual user,
though I've added this to my mdoc.local
(it's not pretty nor is it nice but it does work against 1.23.0-3):
  .\" Handle '.Nm ...' in "Name" section: use the Nm font! It doesn't anymore in 1.23.
  .als Nm_old Nm
  .rm Nm
  .de Nm
  .if \\n[doc-in-name-section] \{\
  .  if "\\*[doc-topic-name]"" \
  .    ds doc-topic-name "\\$1\"
  .  nr doc-in-name-section 0
  .\}
  .Nm_old \\$@
  ..

2:
Dt is misrendered but only in nroff mode.
Given
  .Dt A_B_C 9
In troff mode, and in 1.22.4-10, the top left and right corners were "A_B_C(9)".
In 1.23.0-3 in nroff they are "\fIA_B_C\fP(9)", which:
(a) why would you need this?
(b) completely breaks manuals with underscores in the name,
    because "\fIA_B_C\fP(9)" and "A_B_C(9)" and "\fIA B C\fP(9)"
    are all drawn identically.
I didn't have the time or the energy to root-cause this.

Best,
наб

#1090987#8
Date:
2023-12-27 19:59:34 UTC
From:
To:
At 2023-12-27T20:21:19+0100, наб wrote:

These are all complaints about changes that have been made to groff
upstream, not Debian-specific configuration choices, so I would prefer
to field them in the GNU Savannah bug tracker if you don't mind.

I perceive 3 issues here.

1.  The complaints you led with, which aren't really the substance of
    your report;
2.  the handling of the `Nm` macro; and
3.  the handling of the `Dt` macro.

Would you prefer

A.  me to file them on your behalf upstream, adding you to the CC list,
    or
B.  to do so yourself?

Debian's groff package can of course make different font styling choices
for its mdoc(7) macros if that seems wise to the maintainers, but I
think we should first resolve upstream bugs, if any, and document the
reasons I had for making many of the changes of which you complain,
which can then drive a more informed decision on the part of the package
maintainers to override those choices (or not).

Regards,
Branden

#1090987#11
Date:
2023-12-27 20:00:34 UTC
From:
To:
At 2023-12-27T20:21:19+0100, наб wrote:

Sorry--I should have included a handy URL for upstream bug-reporting
self-service.

https://savannah.gnu.org/bugs/?group=groff&func=additem

Regards,
Branden

#1090987#18
Date:
2023-12-31 22:35:27 UTC
From:
To:
Control: tags -1 + upstream
I definitely wouldn't have found it.

Forwarded as
https://savannah.gnu.org/bugs/?65101
https://savannah.gnu.org/bugs/?65102
which I hopefully reformatted correctly for the bizarre savannah markup.

I also didn't see a mail field, so I didn't enter an address,
so I won't get notifications for these.

#1090987#21
Date:
2023-12-31 22:49:22 UTC
From:
To:
At 2023-12-31T23:35:27+0100, наб wrote:

Admittedly that was kind of a deep link.  I was trying to make things
easy.  :-O

I've got them.  Thank you!

We can add you to the CC list so you'll get notifications in the future.

And you can create an account with which to file future tickets from the
"New User" link at <https://savannah.gnu.org/>.

Regards,
Branden