groff
[Top][All Lists]
Advanced

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

Re: [Groff] Re: getopt() as gtroff macro ?


From: Werner LEMBERG
Subject: Re: [Groff] Re: getopt() as gtroff macro ?
Date: Thu, 23 Sep 2004 07:02:24 +0200 (CEST)

> I think this is important and, while I admire what Keith has
> done, I wonder if there's any way to get a getopt built into
> gtroff?

Nice idea.  What exactly do you have in mind?  Can you make syntax
suggestions?

> I recently heard that SoftQuad troff [...] had an undocumented
> facility for local variables, [...]

This is on my TODO list.  It's not very complicated:

  Introduce a request `local' to tag local variables:

    .de foo
    .  local nr bar 12345
    ..

  The `local' prefix sets a flag within gtroff so that the `nr'
  request saves the old value of `bar'.  After exiting the macro, the
  value is restored.

As usual, I'm quite busy right now, so don't expect something soon.

> I assume a related requirement would be to get .return to actually
> return a value to the calling macro.

How shall this be done?  Similar to TeX, groff has no concept of
returning a value.


    Werner




reply via email to

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