[NTG-context] new command question

Hans Hagen pragma at wxs.nl
Tue Apr 5 23:42:50 CEST 2005


Peter Münster wrote:

> I don't know, if the option method is the best way to realize your
> \globalbodyfont command. I would do it as simple as this:
> \def\globalbodyfont[#1][#2][#3]{%
>   \usetypescriptfile[#1]
>   \usetypescript[#2]
>   \setupbodyfont[#3]}

the name \globalbodyfont is likely to clash (either now or in the future)

> I my opinion, the \globalbodyfont command is not that much better for the
> end-user, than the other 3 commands. I would rather make an
> environment-file:
> \startenvironment e-garamond
> \usetypescriptfile[type-ugm]
> \usetypescript[URWGaramond]
> \setupbodyfont[urwgaramond]
> \stopenvironment
> And then just "\environment e-garamond" in the document-file.

indeed the rpefered way; an alternative is:

\startenvironment my-fonts

\startmode[garamond]
   \usetypescriptfile[type-ugm]
   \usetypescript[URWGaramond]
   \setupbodyfont[urwgaramond]
\stopmode

\stopenvironment

and then

\enablemode[garamond] \environment my-fonts

that way you can collect all your special stuff in one file

Hans






-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------



More information about the ntg-context mailing list