[Bug 297248] groff: .Fx needs the right release version

[email protected] Mon, 03 Aug 2026 17:02:41 +0000
Newsgroups gmane.os.freebsd.devel.documentation
Message-ID <[email protected]/bugzilla/>
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D297248

            Bug ID: 297248
           Summary: groff: .Fx needs the right release version
           Product: Documentation
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Manual Pages
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]

Some of our manual pages use the .Fx macro. The macro expect a correct Free=
BSD
release, or no argument

from the mdoc(7) manpage:
     Fx [version]
          Format the FreeBSD version provided as an argument, or a default
          value if no argument is provided.

          Examples:
                .Fx 7.1
                .Fx

groff complains if the FreeBSD version is not correct, or ends with a dot.

zcat /usr/share/man/man1/elfctl.1.gz | nroff -mdoc >/dev/null=20
doc.tmac:<standard input>:123: warning: .Fx: Unknown FreeBSD version
'Foundation.' (#123)

zcat /usr/share/man/man3/stdbit.3.gz | nroff -mdoc >/dev/null=20
doc.tmac:<standard input>:118: warning: .Fx: Unknown FreeBSD version '15.1.'
(#118)


How to repeat:
find -s /usr/share/man -name '*.gz' | xargs -P$(nproc) -n16 zegrep  '^\.Fx =
.*[^
]\.$|^\.Fx [a-z]'

/usr/share/man/man1/elfctl.1.gz:.Fx Foundation.
/usr/share/man/man1/ipcrm.1.gz:.Fx 6.4 No and 7.1.
/usr/share/man/man1/strings.1.gz:.Fx v3.
/usr/share/man/man1/strings.1.gz:.Fx v5 ,
/usr/share/man/man2/lio_listio.2.gz:.Fx extensions, and should not be used =
in
portable code.
/usr/share/man/man3/stdbit.3.gz:.Fx 15.1.
/usr/share/man/man3/stdc_bit_ceil.3.gz:.Fx 15.1.
/usr/share/man/man3/stdc_bit_floor.3.gz:.Fx 15.1.
/usr/share/man/man3/stdc_bit_width.3.gz:.Fx 15.1.
/usr/share/man/man3/stdc_count_ones.3.gz:.Fx 15.1.
/usr/share/man/man3/stdc_count_zeros.3.gz:.Fx 15.1.
/usr/share/man/man3/stdc_first_leading_one.3.gz:.Fx 15.1.
/usr/share/man/man3/stdc_first_leading_zero.3.gz:.Fx 15.1.
/usr/share/man/man3/stdc_first_trailing_one.3.gz:.Fx 15.1.
/usr/share/man/man3/stdc_first_trailing_zero.3.gz:.Fx 15.1.
/usr/share/man/man3/stdc_has_single_bit.3.gz:.Fx 15.1.
/usr/share/man/man3/stdc_leading_ones.3.gz:.Fx 15.1.
/usr/share/man/man3/stdc_leading_zeros.3.gz:.Fx 15.1.
/usr/share/man/man3/stdc_trailing_ones.3.gz:.Fx 15.1.
/usr/share/man/man3/stdc_trailing_zeros.3.gz:.Fx 15.1.
/usr/share/man/man4/bridge.4.gz:.Fx 16.0.
/usr/share/man/man4/bxe.4.gz:.Fx imposes a limit on the maximum number of
/usr/share/man/man4/if_bridge.4.gz:.Fx 16.0.
/usr/share/man/man4/if_bxe.4.gz:.Fx imposes a limit on the maximum number of
/usr/share/man/man4/if_sume.4.gz:.Fx version and this manual page were writ=
ten
by
/usr/share/man/man4/inet.4.gz:.Fx implementation sets it to zero.
/usr/share/man/man4/sume.4.gz:.Fx version and this manual page were written=
 by
/usr/share/man/man5/pf.conf.5.gz:.Fx pf uses
/usr/share/man/man5/pf.conf.5.gz:.Fx pf .
/usr/share/man/man8/route.8.gz:.Fx provides support for scalable multipath
routing.
/usr/share/man/man3/memalignment.3.gz:.Fx 15.1.


The solution is simple - add a space before the trailing dot:
.Fx 15.1. ->=20
.Fx 15.1 .

or add a newline after .Fx if no argument is required:

.Fx Foundation. ->=20
.Fx
Foundation.

--=20
You are receiving this mail because:
You are on the CC list for the bug.=