Peter Rolf wrote:
Thomas A. Schmitz wrote:
Yes, I'm usually prone to making this kind of mistakes. But if I put exactly the same \doifelse in my TeX file (instead of in the module), the correct value is returned. I also thought there was no trickery involved, but it looks like the key is assigned its value only after the module has been read... I have looked at another module I wrote where I have the same situation (font definition), and it just works. I have no clue where both modules differ.
I'm just guessing (taken from my own pile of mistakes). Hmm, is it a problem of setting the variable, or it's interpretation? Can you find out, if the variable is set correctly in your \setupcrop macro? Just add
\writestatus{[CROP]}{crop mark is: \getvariable{Crop}{mark}}%
right after the \setvariables command and have an eye on the logging.
And if this works (I can't imagine why not), try to exchange the \doifelse nesting by \processaction
\processaction[\getvariable{Crop}{mark}][ camera =>\def\PageBackground{\CameraMarks}, cross =>\def\PageBackground{\CrossMarks},
no spaces before the =>
default=>\def\PageBackground{}, unknown=>\def\PageBackground{}]%
----------------------------------------------------------------- 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 -----------------------------------------------------------------