groff
[Top][All Lists]
Advanced

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

Re: [Groff] -me and macroses


From: Bernd Warken
Subject: Re: [Groff] -me and macroses
Date: Wed, 5 Dec 2001 15:37:17 +0100
User-agent: Mutt/1.2.5i

On Wed, Dec 05, 2001 at 02:32:25PM +0100, Tadziu Hoffmann wrote:
> Wow!  Might it then also be possible in the future
> to nest macro calls (as in ".yy \*[xx]"), or is this
> ruled out a priori because macros are simply string
> replacements and not function calls?

I miss such a feature very much.

I think it shouldn't too hard to implement the following behavior.

  When an escape sequence \*[m a] is met, groff first checks whether there
  is an escape sequence `m a'.  If not, it assumes this is a macro call of
  a macro called `m' taking a single argument `a'.

  So groff treats `\*[m a]' like `.m a' but without the enclosing spaces.

The trailing space can be removed by appending `\c' using `am1'.
The preceding space might be a problem.  Maybe there should be an escape
similar to `\c' that eats one element from the output queue.

Such an extension would not create any incompatibilities to the existing 
code.  I can see a lot of applications for such a feature.  If you want
to use eqn in a dynamical way, this feature is a must.

Bernd Warken


reply via email to

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