From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/39668 Path: news.gmane.org!not-for-mail From: Hans van der Meer Newsgroups: gmane.comp.tex.context Subject: description fails on \if Date: Tue, 25 Mar 2008 20:38:32 +0100 Message-ID: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v919.2) Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1206475454 30723 80.91.229.12 (25 Mar 2008 20:04:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 25 Mar 2008 20:04:14 +0000 (UTC) To: NTG ConTeXt Original-X-From: ntg-context-bounces@ntg.nl Tue Mar 25 21:04:40 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 1JeFNv-0001HY-50 for gctc-ntg-context-518@m.gmane.org; Tue, 25 Mar 2008 21:04:39 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 2CE071FBB5; Tue, 25 Mar 2008 21:04:00 +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 27490-03-5; Tue, 25 Mar 2008 21:03:14 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 73FAE1FC90; Tue, 25 Mar 2008 20:39:40 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 3ACFC1FC90 for ; Tue, 25 Mar 2008 20:39:39 +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 22728-06-7 for ; Tue, 25 Mar 2008 20:39:03 +0100 (CET) Original-Received: from smtp-vbr3.xs4all.nl (smtp-vbr3.xs4all.nl [194.109.24.23]) by ronja.ntg.nl (Postfix) with ESMTP id 729C01FC57 for ; Tue, 25 Mar 2008 20:39:03 +0100 (CET) Original-Received: from [192.168.1.78] (a82-95-102-36.adsl.xs4all.nl [82.95.102.36]) (authenticated bits=0) by smtp-vbr3.xs4all.nl (8.13.8/8.13.8) with ESMTP id m2PJcvMH077592 for ; Tue, 25 Mar 2008 20:39:03 +0100 (CET) (envelope-from hansm@science.uva.nl) X-Mailer: Apple Mail (2.919.2) X-Virus-Scanned: by XS4ALL Virus Scanner 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:39668 Archived-At: 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] 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 <> will find the best remedy. Hans van der Meer ___________________________________________________________________________________ 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 ___________________________________________________________________________________