groff
[Top][All Lists]
Advanced

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

Re: [Groff] soelim and file names defined in string registers


From: Tadziu Hoffmann
Subject: Re: [Groff] soelim and file names defined in string registers
Date: Tue, 22 Aug 2006 11:35:41 +0200
User-agent: Mutt/1.5.11

> > (it just would be nice if the `.so' request _could_
> > interpolate the string register value)
> 
> Indeed, but I don't see how to do that properly.

It *does* interpolate the string register value, but only
at *troff* runtime.  (Well, actually it's not the ".so"
request that does the interpolation but rather the general
read-and-process-an-input-line mechanism of troff that
does this.)


> 1. to modify only some string registers at the top of a document
> to control the "sourcing" without the need to look up the `.so'
> requests (essentially the same reason one prefers to define some
> constants at the top of a programm instead of hardcoding numbers
> all over the place).

It appears that what you're attempting is some "configuration"
mechanism just to make life easier, and that you're not dependent
on it actually being troff that does the interpolation (i.e.,
you're not "computing" the name from information that only
troff, and no other program, would have).  My suggestion would
be to simply use a general-purpose preprocessor such as m4 (or
perhaps even cpp) as the first stage in the processing pipeline.






reply via email to

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