[NTG-context] getvariable

Peter Rolf indiego at gmx.net
Thu Oct 6 14:45:06 CEST 2005


Thomas A. Schmitz wrote:
> Peter, thanks for your help yet again!
> 
> On Oct 6, 2005, at 12:01 PM, Peter Rolf wrote:
> 
>> This should work.
> 
> 
> OK, so I'm not completely off the mark...
> 
maybe we're both :)

>> The only thing that is missing, is a call (at the end
>> of \setupcrop) to a separate routine (based on your \doifelse
>> construct), which sets up the background.
>>
>> Or have i missed something? :)
>>
> Actually, this part of the code works. I have defined overlays/layers 
> and a variable PageBackground and in my doifelse want this
> 
> \let\PageBackground\empty
> \def\CameraMarks{Camera}
> \def\CrossMarks{Cross}
> 
> \doifelse{\getvariable{Crop}{mark}{camera}
>   {\let\PageBackground\CameraMarks}
>   {\doifelse{\getvariable{Crop}{mark}{cross}
>      {\let\PageBackground\CrossMarks}
>      {\relax}
> 
> For debugging purposes, I just have this
> 
> \doifelse{\GetMark}{camera}
>   {mark defined as \getvariable{Crop}{mark}}
>   {mark not defined: \getvariable{Crop}{mark}}
> 
> which will print out a message. \getvariable{Crop}{mark} however, is 
> either empty or has the value I predefine when I initialize it, it  does
> not take the user-supplied value within the module (if I insert  this
> doifelse thing into the document, it does return the correct  value
> because then the \setup-command has been read before.)
> 

Normally there is no magic in setting variables. So double check the
code where you set (\setvariables[Crop][...]) the variables. Maybe a
typo (lowercase namespace,.. ).

Peter

> Thanks, and best
> 
> Thomas
> _______________________________________________
> ntg-context mailing list
> ntg-context at ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context
> 
> 



More information about the ntg-context mailing list