Hans van der Meer wrote:

> After some detective work in which Wolfgang Schuster had a large share  
> and has found the most elegant workaround, the addition of a \relax  
> just after the description call prevents the error:
> \def\shortanswer#1\par{%
>       \par % be sure to end paragraph here
>       \answerblock{}% % {} needed here in description call
>       \relax          % <<<<<<<<<<<<<<<<<   \relax prevents crash on if
>       \ifanswers #1\else\dotfill\strut\fi
>       \par            %  final \par of description ... \par
>       }
> 
> The way \relax stops the error reminds me of the \relax that one  
> places after a number in order to separate that from the code following.
> I did compare core-des.tex, both the last version and the archived  
> from 2007-04-17. But I must admit, I did not succeed finding a clue  
> among the differences about what could have happened. The code is a  
> bit too intricate to just jump in and pinpoint the culprit -- at least  
> for me.

i cannot put a \relax in there because \answerblock looks ahead

the argument grabber handles some of the if's but only the primitives;

in your case ... don't use \ifanswers, just use modes ...

\enablemode[answers] ... \doirmnode{answers}

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
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to