groff
[Top][All Lists]
Advanced

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

Re: [Groff] Passing -D argument to grap on groff command line?


From: Ted Faber
Subject: Re: [Groff] Passing -D argument to grap on groff command line?
Date: Wed, 20 Sep 2006 23:33:29 -0700
User-agent: Mutt/1.4.2.2i

On Thu, Sep 21, 2006 at 07:54:27AM +0200, Werner LEMBERG wrote:
> 
> > I realize that it is possible to use the environment variable
> > GRAP_DEFINES to pass the name of the grap definition file to grap,
> > but I'd really like to be able to do this from the groff command
> > line.  How do I do this?  The groff "-P" option seems to pass
> > arguments on to postprocessors only.
> 
> Indeed, groff has no ability to pass arguments to preprocessors, even
> for the ones which come with the groff bundle.  For eqn, to name an
> example, Clarke's solution was to add configuration support directly
> into the document via a special first .EQ ... .EN section.  Maybe
> something similar exists for grap also?  Otherwise, you can pass the
> environment variable directly on the command line:
> 
>   GRAP_DEFINES=foo groff ...

Hi, Werner.  I'm glad to hear from you again.  Hope all's well.

The defines file is just included the same way as if 
.G1
copy "grap.defines"
.G2
started the file, so you can always start your source file with your own
.G1 .. .G2 block that 
copies a grap.defines that overwrites the contents of the default
defines.  However, you can't pass in the -D to tell grap not to use any
defines, so this isn't quite as nice as one would hope.

Sorry I can 't be more helpful.

-- 
http://www.lunabase.org/~faber
Unexpected attachment? http://www.lunabase.org/~faber/FAQ.html#SIG

Attachment: pgpfU1gpGjzoY.pgp
Description: PGP signature


reply via email to

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