From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/71548 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: \doifmode and friends Date: Tue, 4 Oct 2011 23:42:12 +0200 Message-ID: <03BF7BD4-26A2-4C6E-BC2C-F31A6FFF24CE@googlemail.com> References: <5BB4EE38-171A-4DF4-BE0B-2484B95BDCAF@uva.nl> <7E11B7F1-5A78-48E0-BAB5-D2C3360F6EFE@uva.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1244.3) Content-Type: multipart/mixed; boundary="===============1760476722==" X-Trace: dough.gmane.org 1317764551 23465 80.91.229.12 (4 Oct 2011 21:42:31 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 4 Oct 2011 21:42:31 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Oct 04 23:42:25 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 1RBCkr-00033K-85 for gctc-ntg-context-518@m.gmane.org; Tue, 04 Oct 2011 23:42:25 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 45BD3CAFCB; Tue, 4 Oct 2011 23:42:24 +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 fwkTyjrt1ARf; Tue, 4 Oct 2011 23:42:21 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 5A512CAFB5; Tue, 4 Oct 2011 23:42:21 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 5BFBFCAFB5 for ; Tue, 4 Oct 2011 23:42:19 +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 Y8PKGYqd7bHH for ; Tue, 4 Oct 2011 23:42:17 +0200 (CEST) Original-Received: from filter3-til.mf.surf.net (filter3-til.mf.surf.net [194.171.167.219]) by balder.ntg.nl (Postfix) with ESMTP id 45B09CA680 for ; Tue, 4 Oct 2011 23:42:17 +0200 (CEST) Original-Received: from mail-ey0-f169.google.com (mail-ey0-f169.google.com [209.85.215.169]) by filter3-til.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id p94LgFeb029015 for ; Tue, 4 Oct 2011 23:42:16 +0200 Original-Received: by eye13 with SMTP id 13so1284196eye.14 for ; Tue, 04 Oct 2011 14:42:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=from:mime-version:content-type:subject:date:in-reply-to:to :references:message-id:x-mailer; bh=127HQa/tjNlqPpL65/wiyl8KKuvJekFXR7T0wiyZGlA=; b=LkxhadTu51Vj8gwHifHbjxDQpa0PtR4qB9R9ps99tTbP8ar0mjcYDAgbeq4ekO8uPz 3rhmaCjARYslbL7lF3Y/Brw4TfnxMWORWd5BgV2l7m0C+TA9uVcsXv5GMSMBT/f1qWwL 5+9YRzrReXeafVZ33wXCURWNrbcHybpEP7Be0= Original-Received: by 10.223.75.24 with SMTP id w24mr2331592faj.132.1317764535731; Tue, 04 Oct 2011 14:42:15 -0700 (PDT) Original-Received: from [192.168.2.31] (p5482C118.dip.t-dialin.net. [84.130.193.24]) by mx.google.com with ESMTPS id c1sm27015903fab.15.2011.10.04.14.42.13 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 04 Oct 2011 14:42:14 -0700 (PDT) In-Reply-To: <7E11B7F1-5A78-48E0-BAB5-D2C3360F6EFE@uva.nl> X-Mailer: Apple Mail (2.1244.3) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.215.169; 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: 0eFEJGfxH - a5e40257b790 - 20111004 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.219 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:71548 Archived-At: --===============1760476722== Content-Type: multipart/alternative; boundary="Apple-Mail=_5E81617F-2272-42F2-B829-4DB9A249245F" --Apple-Mail=_5E81617F-2272-42F2-B829-4DB9A249245F Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 Am 04.10.2011 um 23:17 schrieb Meer, H. van der: >=20 > On 4 okt. 2011, at 20:44, Wolfgang Schuster wrote: >=20 >>=20 >> Am 04.10.2011 um 20:37 schrieb Aditya Mahajan: >>=20 >>> On Tue, 4 Oct 2011, Meer, H. van der wrote: >>>=20 >>>> I find that "abc \doifmode{mode}{text} more text" can introduce = extra whitespace. I conclude therefore that there is no \ignorespaces at = work here. As a consequence the \doifmode does not completely disappear = if mode is not satisfied. >>>> Is this intentional or should this behaviour be changed? >>>=20 >>> Can you provide a minimal example. I don't get any extra spaces >>>=20 >>> \enablemode[test] >>> \starttext >>> A\doifmode{test}{B}C >>>=20 >>> A\doifmode{notest}{B}C >>> \stoptext >>=20 >> There is a unwanted space in the second paragraph. >=20 > I dare voicing a different opinion. Allthough there indeed is both a = space before the \doifmode as well as after it, I am aware of that but = that is besides my point. I expected the \doifmode to vanish completely = when the condition is not met. As is the case, even if the condition is = not met it has a measurable effect because of the extra space being = typeset.=20 > To be more explicit, my expectations were: A = \doifmode{condition-not-met}{B} C resulting in: AC=20 > whereas it becomes: A C. I guess modes aren=92t meant for this but again i can only offer my = annotation module. \usemodule[annotation] \defineannotation[test][alternative=3Dtext] \starttext A \test{B} C \setupannotation[test][alternative=3Dnone,next=3D\ignorespaces] A \test{B} C \stoptext Wolfgang --Apple-Mail=_5E81617F-2272-42F2-B829-4DB9A249245F Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=windows-1252

On 4 okt. 2011, at 20:44, Wolfgang Schuster = wrote:


Am 04.10.2011 um 20:37 schrieb Aditya = Mahajan:

On Tue, 4 Oct 2011, Meer, H. van der = wrote:

I find = that "abc \doifmode{mode}{text} more text" can introduce extra = whitespace. I conclude therefore that there is no \ignorespaces at work = here. As a consequence the \doifmode does not completely disappear if = mode is not = satisfied.
Is = this intentional or should this behaviour be = changed?

Can you provide a minimal = example. I don't get any extra = spaces

\enablemode[test]
\starttext
A\doifmode{test}{B}C

A\doifmode{notest}{B}C
\stoptext

There is a = unwanted space in the second paragraph.

I dare voicing a = different opinion. Allthough there indeed is both a space before the = \doifmode as well as after it, I am aware of that but that is besides my = point. I expected the \doifmode to vanish completely when the condition = is not met. As is the case, even if the condition is not met it has a = measurable effect because of the extra space being typeset.
To be = more explicit, my expectations were: A \doifmode{condition-not-met}{B} C = resulting in: AC
whereas it becomes: A C.

= I guess modes aren=92t meant for this but again i can only offer my = annotation = module.

\usemodule[annotation]

\defineannotation[test][alternative=3Dtext]

\sta= rttext

A \test{B} = C

\setupannotation[test][alternative=3Dnone,next=3D= \ignorespaces]

A \test{B} = C

\stoptext

Wolfga= ng

= --Apple-Mail=_5E81617F-2272-42F2-B829-4DB9A249245F-- --===============1760476722== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ 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 ___________________________________________________________________________________ --===============1760476722==--