From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/36277 Path: news.gmane.org!not-for-mail From: Aditya Mahajan Newsgroups: gmane.comp.tex.context Subject: Re: A sometxt bug (rather misfeature) Date: Wed, 29 Aug 2007 16:32:13 -0400 (EDT) Message-ID: 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: sea.gmane.org 1188419561 22471 80.91.229.12 (29 Aug 2007 20:32:41 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 29 Aug 2007 20:32:41 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed Aug 29 22:32:38 2007 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 1IQUDH-0001IJ-8m for gctc-ntg-context-518@m.gmane.org; Wed, 29 Aug 2007 22:32:31 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 969AA204A9; Wed, 29 Aug 2007 22:32:30 +0200 (CEST) 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 17709-06-3; Wed, 29 Aug 2007 22:32:22 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 7D44820118; Wed, 29 Aug 2007 22:32:22 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id BEB1920118 for ; Wed, 29 Aug 2007 22:32:20 +0200 (CEST) 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 17709-06-2 for ; Wed, 29 Aug 2007 22:32:17 +0200 (CEST) Original-Received: from hackers.mr.itd.umich.edu (smtp.mail.umich.edu [141.211.14.81]) by ronja.ntg.nl (Postfix) with ESMTP id BC05320117 for ; Wed, 29 Aug 2007 22:32:16 +0200 (CEST) Original-Received: FROM aditya.annarb01.mi.comcast.net (adsl-68-79-96-128.dsl.sfldmi.ameritech.net [68.79.96.128]) BY hackers.mr.itd.umich.edu ID 46D5D7CE.4D23A.19684 ; 29 Aug 2007 16:32:14 -0400 In-Reply-To: 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:36277 Archived-At: On Wed, 29 Aug 2007, Aditya Mahajan wrote: > Hi, > > Found an interesting sometxt misfeature. > > \startMPinclusions > boolean test ; test=true ; > \stopMPinclusions > > \startbuffer[test] > if test : > label(\sometxt{True}, origin) ; > fi ; > label(\sometxt{False}, (10,10)) ; > \stopbuffer > > \processMPbuffer[test] > > \blank[big] > > \startMPinitializations > test := false ; > \stopMPinitializations > > \processMPbuffer[test] > > Too bad context cannnot parse metapost syntax :) > > Workaround (ugly) Another workaround, slightly less ugly (as long as you count the number of \sometxt in the if part. \startbuffer[test] if test : label(\sometxt{True}, origin) ; else : txtnext := txtnext + 1 ; fi ; label(\sometxt{False}, (10,10)) ; \stopbuffer \processMPbuffer[test] Aditya ___________________________________________________________________________________ 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 ___________________________________________________________________________________