Quoth G. Branden Robinson:
There may be some malformedness here complicating matters.
My example of .No Ar is not malformed: The No there is useless,
yes, but that shouldn’t break anything. The warning is a warning
of the uselessness, not a warning of unspecifiedness. I simply
wanted to point toward Ar being called as argument to a different
macro, disregarding what the exact macro is that is invoked
directly and calls Ar.
What makewhatis(8) does (.Fl t Ar) might have been a better
example, but wouldn’t have illustrated that the error is not in
the .Fl t or in the .Ar invocation but in the /called/ Ar.
I think.
It's possible this is an error in a mandoc man page. Unthinkable? ;-)
I wouldn’t at all be surprised by what I’d call errors in the
mandoc man pages, as I guess they aren’t tested a whole lot with
more general troffs and the project calls mdoc not a macro package
or the like, but its own language.
At 2024-03-18T12:56:45-0500, G. Branden Robinson wrote:
...and in fact when I change line 9:
-.No Ar
+.No \&Ar
...the applicable warnings from groff mdoc _and_ mandoc go away, and
the text formats as you would expect.
The foregoing can be mostly disregarded. I forgot that mdoc(7)'s `Ar`
macro supplies its own "default arguments" in the absence of explicit
ones, so it's okay to call it with none.
And that Ar is a macro that I want to call here. `.No \&Ar`
renders as one might expect, but not as one would expect if typing
`.No Ar`.
Do you find the attached "groffed" mandoc collection an improvement?
Yes. Though Courier is as ugly as ever. And the page numbers
reset at the start of each section. (“Section” being an older
term for “man pages,” if memory serves right.) Which they
shouldn’t do—the book is one unit; it should get its own page
numbers. And in other books, you don’t usually see page numbers
per chapter.
And on page 1 (See? But I do indeed mean the first page of
apropos(1).), in the second paragraph of the DESCRIPTION, you can
see too much space after “Nm.” That happens in a few places.
Another place is, on the same page, “( expr )” as the first tag
of the tagged list at the end.
(It still seems a little weird to me to follow `No` with `Ar`, but
having just embarrassed myself with my mdoc(7) inexpertise, I'll
withhold further opinion...)
Don’t worry, it would be weird to do that outside an example.