groff
[Top][All Lists]
Advanced

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

Re: man Macro Package and pdfmark


From: Dave Kemper
Subject: Re: man Macro Package and pdfmark
Date: Mon, 17 Feb 2020 07:32:36 -0600

> I won't say more on this topic.  We are on a groff list.

Considering that groff's own documentation is (perversely? ironically?
choose your own adverb) written in Texinfo format, a discussion of the
merits of that format could be considered on topic here (if a bit
academic, since no one is champing at the bit to port groff's manual
to any other format).

I'm personally indebted to whoever on this list first pointed out that
you can pipe info(1) through less(1) and view the entire groff manual
as one long page.  This has been a godsend and is the only way I've
accessed the groff manual over the past 5+ years.

I hacked together a sed script that further pares it down by, among
other things, removing all the macro-package-specific stuff (the only
macro packages documented in info format are ones I don't use, but
which gave me false positives when using less's search) and the
various indexes (redundant in this format but making up about a third
of the line count).  In case it's useful to anyone else:

alias infogroff="info groff |
                 sed -E '/^[0-9] Macro Packages/,\
                         /Prev: Macro Packages, *Up: Top$/\
                         {/Prev: Macro Packages, *Up: Top$/!d};
                         /^[0-9.]+ .gtroff. Output/,\
                         /Prev: gtroff Output, *Up: File formats$/\
                         {/Prev: gtroff Output, *Up: File formats$/!d};
                         /^Appendix A Copying This Manual$/,\$d;
                         s/^File: [^,]+, +(Node: [^,]+),.+/\1/' | less"

No idea whether this works with a non-GNU sed, or any shell besides bash.



reply via email to

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