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 14:53:12 -0500

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.

Here's the fix.

diff --git a/tmac/doc.tmac b/tmac/doc.tmac
index b299349ed..a8cd55efd 100644
--- a/tmac/doc.tmac
+++ b/tmac/doc.tmac
@@ -831,7 +831,7 @@ .de Ar
 .  nr doc-arg-ptr +1
 .  doc-print-prefixes
 .  ie (\n[doc-arg-count] < \n[doc-arg-ptr]) \{\
-.    nop \)\*[doc-str-Ar-default]\&\f[]\c
+.    nop \)\*[doc-str-Ar-default]\&\c
 .    doc-print-and-reset
 .  \}
 .  el \{\

Thanks, Lennart!

This fix will be in my next push, along with another important mdoc one
(Savannah #65480).

Do you find the attached "groffed" mandoc collection an improvement?

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

Regards,
Branden

Attachment: mandoc-groffed-v2.pdf
Description: mandoc-groffed-v2.pdf

Attachment: signature.asc
Description: PGP signature


reply via email to

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