From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/71746 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: \startmode and \ignorespaces Date: Fri, 14 Oct 2011 11:26:10 +0200 Message-ID: <201C6347-13D4-47B3-961B-F272A1C5BD75@googlemail.com> References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1244.3) Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1318584402 11234 80.91.229.12 (14 Oct 2011 09:26:42 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 14 Oct 2011 09:26:42 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Oct 14 11:26:38 2011 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1REe2F-0003NF-Cu for gctc-ntg-context-518@m.gmane.org; Fri, 14 Oct 2011 11:26:35 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 69113CB05F; Fri, 14 Oct 2011 11:26:34 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 5PLrOVld1YTP; Fri, 14 Oct 2011 11:26:30 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 58EDFCB057; Fri, 14 Oct 2011 11:26:30 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 999FECB057 for ; Fri, 14 Oct 2011 11:26:29 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id UJQps5JnQoqU for ; Fri, 14 Oct 2011 11:26:25 +0200 (CEST) Original-Received: from filter3-ams.mf.surf.net (filter3-ams.mf.surf.net [192.87.102.71]) by balder.ntg.nl (Postfix) with ESMTP id A491ECB055 for ; Fri, 14 Oct 2011 11:26:25 +0200 (CEST) Original-Received: from mail-ww0-f41.google.com (mail-ww0-f41.google.com [74.125.82.41]) by filter3-ams.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id p9E9QMwr007492 for ; Fri, 14 Oct 2011 11:26:25 +0200 Original-Received: by wwf10 with SMTP id 10so1294969wwf.2 for ; Fri, 14 Oct 2011 02:26:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; bh=5/rI1k5iOmSDF6p+cSHzLm6Jh0HmR+l+oMgc0yD8Zho=; b=sgiVmVz4msQ7Emjf+Ammu0hrw69BqgbnbP0+0y10xAjhB1tK1L3/QgXjphiVx6Izk3 jzRnAPmn4kk47+NT02t/eiDkWFwZroGGQSFMmJ2FVZQfyeFvqrz2kgkNzR+eES/7Yrz7 tDb2Dzm3R5769GHcX4Jj+3OiVR+qcc+qtlKJM= Original-Received: by 10.223.4.132 with SMTP id 4mr2794860far.12.1318584382275; Fri, 14 Oct 2011 02:26:22 -0700 (PDT) Original-Received: from [192.168.2.34] (p5482D4A1.dip.t-dialin.net. [84.130.212.161]) by mx.google.com with ESMTPS id u6sm2641480faf.3.2011.10.14.02.26.18 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 14 Oct 2011 02:26:21 -0700 (PDT) In-Reply-To: X-Mailer: Apple Mail (2.1244.3) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=74.125.82.41; country=US; region=CA; city=Mountain View; postalcode=94043; latitude=37.4192; longitude=-122.0574; metrocode=807; areacode=650; http://maps.google.com/maps?q=37.4192,-122.0574&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0cFIxqmyj - b297a9dc3628 - 20111014 X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.71 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 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 Xref: news.gmane.org gmane.comp.tex.context:71746 Archived-At: Am 14.10.2011 um 10:38 schrieb Meer, H. van der: > I made an example of the effect of this on \doifmode and \startmode. The example shows that the appearance of extra space in \doifmode follows a regular pattern. The startmode case differs in that respect because \startmode[condition-true] has the extra space but \startmode[condition-false] has not. In my view that is an unwanted anomaly. A little redefinition remedies that as can be seen in the example. I wrote you already a few times that you can use the annotation module for this. The module serves also as replacement for the fixme module where it is necessary to take care that no extra spaces are added when the text is hidden. \usemodule[annotation] \defineannotation[fulltext] [alternative=text] \defineannotation[shorttext][alternative=none] \defineannotation[modetext] [alternative=command,command=\ModeText] \define[2]\ModeText {\doifelse{\placeannotationtitle}{off}{\removeunwantedspaces}{#2}} \starttext abc \fulltext {pqr} xyz abc \shorttext{pqr} xyz abc \fulltext [alternative=none]{pqr} xyz abc \shorttext[alternative=text]{pqr} xyz \blank abc \startfulltext pqr \stopfulltext xyz abc \startshorttext pqr \stopshorttext xyz abc \startfulltext [alternative=none] pqr \stopfulltext xyz abc \startshorttext[alternative=text] pqr \stopshorttext xyz \blank abc \modetext {pqr} xyz abc \modetext {on}{pqr} xyz abc \modetext{off}{pqr} xyz \blank abc \startmodetext pqr \stopmodetext xyz abc \startmodetext{on} pqr \stopmodetext xyz abc \startmodetext{off} pqr \stopmodetext xyz \stoptext 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________