groff
[Top][All Lists]
Advanced

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

Re: [Groff] refer question


From: Werner LEMBERG
Subject: Re: [Groff] refer question
Date: Fri, 06 May 2005 07:40:24 +0200 (CEST)

> > is there a way to reset refer settings somewhere 'downstream' if
> > the 'upstream' defaults are no good?
> >
> > specifically:
> >
> > in my document I source a certain defaults file in which, upon
> > different other settings, one finds:
> >
> > ...
> > .R1
> > database the_standard_database
> > .R2
> > ...
> >
> > now, I want to set in the _current_ document
> >
> > ...
> > .R1
> > database a_different_database
> > .R2
> > ...
> >
> > which by itself of course _appends_ the new database to the set of
> > databases searched (and is searched latest).
> >
> > can I enforce solely searching of the new database without
> > eliminating the first one from the defaults file (which would be
> > bad for other documents...)? i.e. is there a way to clear the
> > variable holding the database string (well, what is it's name? :-) )
>
> .R1
> no-default-database
> database a_different_database
> .R2
>
> instructs refer not to search the default database.  If later you
> need to have refer include the default database again:
>
> .R1
> default-database <filename>
> .R2
>
> I think that should work.

No, it doesn't.  First of all, `default-database' doesn't take an
argument.  The default database is either the compiled-in value
(normally `/usr/dict/papers/Ind') or the value set with the `REFER'
environment variable.  Second, databases are always additive; it isn't
possible to either remove an entry or reset the list to an empty
value.

I suggest that you don't do

  .R1
  database the_standard_database
  .R2

in your ini file; instead you should set the default database with the
REFER environment variable.  You can then suppress its loading by
issuing

  .R1
  no-default-database
  .R2

at the very beginning of your document, after which

  .R1
  database ...
  .R2

loads your specific database(s).

Note that `REFER' isn't something new; it just hasn't been documented
before groff version 1.19.


    Werner




reply via email to

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