On Tue, Mar 25, 2008 at 8:38 PM, Hans van der Meer <[EMAIL PROTECTED]> wrote: > There is the following problem on code that did work around july 2007, > but no longer under the current context version (2008-03-11). > > Define a description, I did: > \definedescription[answerblock][% > \c!margin=\v!no,\c!location=\v!left,% > \c!headstyle=\@@exmintrostyle,\c!style=\@@exmstyle,% > \c!before=,\c!inbetween=,\c!after=,% > \c!hang=\@@exmhang,\c!width=\questionblockwidth,% > \c!text=\placeanswerstart]
Could you try to set "title=no". > Typeset with this description inside the following macro: > \def\shortanswer#1\par{% > \par % be sure to end paragraph here > \answerblock{}% % {} needed here in description call > \ifanswers #1\else\dotfill\strut\fi % <<<<<< crashing on this if > \par % final \par of description ... \par > } > The above code crashes with: ! Incomplete \ifx; all text was ignored > after ... > > 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. > > Allthough Wolfgang's workaround saves the day, I feel this problem > deserves solving inside ConTeXt, not outside it. Someday somewhere > another person will stumble on the same problem -- a situation that > can and should be avoided, in my view. > Therefore I explain the problem here as fully as possible hoping > someone knowledgeable with descriptions <<we might need to fall back > to Taco or Hans>> will find the best remedy. I would say the message comes from \dodoublegroupempty in \@@description. Wolfgang ___________________________________________________________________________________ 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 ___________________________________________________________________________________