groff
[Top][All Lists]
Advanced

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

Re: [idea] troff -Troff


From: Douglas McIlroy
Subject: Re: [idea] troff -Troff
Date: Mon, 19 Feb 2024 22:12:53 -0500

> The question is whether or not man macros can be expanded
> to their groff equivalents.

If you'd consider a preprocessor based on groff, there's a
notionally simple way to get a copy of the input with macros
and strings expanded: Provide a groff option that has the
side effect of sending post-expansion input to a file, but
otherwise behaves exactly like groff.

This scheme may have trouble with diversions and groff-only
requests. However some of the latter may be approximated
by appropriate macro definitions.

There are two ways to deal with input-switching via .so and
its ilk. (1) treat it like a macro, so it is replaced by the
(macro-expanded) include file. (2) leave it in the side
output, but turn off the side stream while processing the
include file. Perhaps there should be a switch for making
the choice.

Doug


reply via email to

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