From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/39680 Path: news.gmane.org!not-for-mail From: "Wolfgang Schuster" Newsgroups: gmane.comp.tex.context Subject: Re: description fails on \if Date: Wed, 26 Mar 2008 08:32:20 +0100 Message-ID: <115224fb0803260032s54798150y3a2b7fb6ca2d1d6e@mail.gmail.com> References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1206516872 21221 80.91.229.12 (26 Mar 2008 07:34:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 26 Mar 2008 07:34:32 +0000 (UTC) To: "mailing list for ConTeXt users" Original-X-From: ntg-context-bounces@ntg.nl Wed Mar 26 08:35:02 2008 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1JeQ9x-0007gJ-Ao for gctc-ntg-context-518@m.gmane.org; Wed, 26 Mar 2008 08:34:57 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 7A71F1FBEB; Wed, 26 Mar 2008 08:34:20 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 26847-02-14; Wed, 26 Mar 2008 08:34:01 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 9BB961FBC6; Wed, 26 Mar 2008 08:34:01 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id D39F81FBC6 for ; Wed, 26 Mar 2008 08:33:59 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 28466-09 for ; Wed, 26 Mar 2008 08:33:23 +0100 (CET) Original-Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.238]) by ronja.ntg.nl (Postfix) with ESMTP id 0728E1FBA8 for ; Wed, 26 Mar 2008 08:32:21 +0100 (CET) Original-Received: by wx-out-0506.google.com with SMTP id i27so3904315wxd.5 for ; Wed, 26 Mar 2008 00:32:20 -0700 (PDT) Original-Received: by 10.150.144.9 with SMTP id r9mr4606001ybd.170.1206516740899; Wed, 26 Mar 2008 00:32:20 -0700 (PDT) Original-Received: by 10.150.49.21 with HTTP; Wed, 26 Mar 2008 00:32:20 -0700 (PDT) In-Reply-To: Content-Disposition: inline X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.9 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:39680 Archived-At: On Tue, Mar 25, 2008 at 8:38 PM, Hans van der Meer 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 < 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 ___________________________________________________________________________________