[NTG-context] processing of setvariables/getvariables again

Taco Hoekwater taco at elvenkind.com
Sat Oct 22 10:55:54 CEST 2005


Thomas A. Schmitz wrote:
> Taco,
> 
> I tried your suggestion, but I'm not sure I'm doing it the right way.  I 
> took the definition of \initialize... like so:
> 
> \def\initializegreekfont%
> {\getvariable{Greek}{font}}
>    \appendtoks \initializegreekfont \to \everystarttext % I guess I  
> will need a similar procedure for                                                        %  

That is not what I meant. What (I think) you want is more like this:

  \def\initializegreekfont%
   {\starttypescript[Greek]
    \definetypeface [My\getvariable{Greek}{font}] [rm] [serif]
     [\getvariable{Greek}{font}] [default] [encoding=agr]
    \stoptypescript
    \startsetups[enablegreek]
     \catcode`~=\other
     \catcode`|=\other
     \catcode`'=\other
     \language[greek]
     \switchtobodyfont[My\getvariable{Greek}{font}]
     \stopsetups }
  \appendtoks \initializegreekfont \to \everystarttext

In this way, you postpone all stuff that depends on the user-supplied
variables until the occurance of \starttext. I hope you can understand
me better now>

Cheers, Taco


More information about the ntg-context mailing list