groff
[Top][All Lists]
Advanced

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

Re: Milestone reached: hyperlinked mdoc(7) documents in PDF


From: G. Branden Robinson
Subject: Re: Milestone reached: hyperlinked mdoc(7) documents in PDF
Date: Mon, 18 Mar 2024 12:56:42 -0500

Hi Lennart,

At 2024-03-18T02:08:10+0000, Lennart Jablonka wrote:
> .Dd March 18, 2024
> .Dt EMPTY-CALLED-AR
> .Os
> .Sh NAME
> .Nm empty-called-Ar
> .Nd a groff \-mdoc bug
> .Sh DESCRIPTION
> Empty called Ar:
> .No Ar
> That's it: This text right here shouldn't be oblique.
> .Pp
> I found this in your mandoc man page PDF in
> .Xr makewhatis 8 ,
> as
> .Bd -literal -offset indent
> \&.Fl t Ar
> .Ed

There may be some malformedness here complicating matters.

$ /usr/bin/nroff -mdoc EXPERIMENTS/lennart.mdoc # groff 1.22.4
mdoc warning: Using a macro as first argument cancels effect of .No (#9)
...
$ ~/groff-stable/bin/nroff -mdoc EXPERIMENTS/lennart.mdoc # groff 1.23.0
mdoc warning: Using a macro as first argument cancels effect of .No (#9)
...
$ ~/groff-HEAD/bin/nroff -mdoc EXPERIMENTS/lennart.mdoc
doc.tmac:EXPERIMENTS/lennart.mdoc:9: warning: using a macro as first argument 
cancels effect of .No

$ dpkg -l mandoc | tail -n 1
ii  mandoc         1.14.6-1     amd64        BSD manpage compiler toolset

$ mandoc -Tlint EXPERIMENTS/lennart.mdoc
...
mandoc: EXPERIMENTS/lennart.mdoc:2:2: WARNING: missing manual section, using 
"": Dt EMPTY-CALLED-AR
...

...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.

It is not a goal of groff to behave identically to mandoc(1) in the face
of unspecified input.  Is your input specified somewhere?  (I don't have
the command of mdoc(7) that I do of man(7), and as we've seen, my grasp
of the latter is not flawless.)  Can you come up with input that _is_
specified and yet still manifests this behavior?

And, yeah, I noticed the oblique face getting stuck on, too, when I
scrolled to the end of the document.

It's possible this is an error in a mandoc man page.  Unthinkable?  ;-)

(That said, groff mdoc could do what some macro packages call a
"paragraph reset" more frequently, including restoration of the Times
[or default] family and roman style.  Doing so might align with other
ideas I have for typesetting mdoc(7) that I am afraid will [further]
scandalize наб.)

Regards,
Branden

Attachment: signature.asc
Description: PGP signature


reply via email to

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