From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/47331 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: \doif(not)empty(else) Date: Sun, 08 Feb 2009 20:29:09 +0100 Message-ID: <498F3285.7000406@gmail.com> References: <326847810902080929ibdf1901y6e29b57e1a3b05c7@mail.gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1"; Format="flowed" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1234121506 14252 80.91.229.12 (8 Feb 2009 19:31:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 8 Feb 2009 19:31:46 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sun Feb 08 20:33:01 2009 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 1LWFOl-0006N2-5X for gctc-ntg-context-518@m.gmane.org; Sun, 08 Feb 2009 20:32:59 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id A3D251FB6D; Sun, 8 Feb 2009 20:31:37 +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 00618-02-2; Sun, 8 Feb 2009 20:30:33 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id C259D1FB1D; Sun, 8 Feb 2009 20:30:33 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 1346F1FB1D for ; Sun, 8 Feb 2009 20:30:32 +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 00618-02 for ; Sun, 8 Feb 2009 20:29:59 +0100 (CET) Original-Received: from filter2-til.mf.surf.net (filter2-til.mf.surf.net [194.171.167.218]) by ronja.ntg.nl (Postfix) with ESMTP id 5AFE91FB14 for ; Sun, 8 Feb 2009 20:29:59 +0100 (CET) Original-Received: from mail-bw0-f165.google.com (mail-bw0-f165.google.com [209.85.218.165]) by filter2-til.mf.surf.net (8.13.8/8.13.8/Debian-3) with ESMTP id n18JTskA005120 for ; Sun, 8 Feb 2009 20:29:54 +0100 Original-Received: by bwz9 with SMTP id 9so684224bwz.2 for ; Sun, 08 Feb 2009 11:29:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=uepd1nNBasYJOcf6FUSbtIcKVk5xQbaDJiOP8eDFulM=; b=uc9AxupC6yNQTJSc7kTSmJr2qlJd2Bzo4sSWmhtMXp2Tx8eUnUjpDh+MT5K4LgeO1a /MBhur96Nd0ks1/rbBhjnE9go/p+gA3zGXLacneaE4Bq47ivlgPpTiYQzkzSXYkHeH2M s+X5ASgRu3rUG9iNPBKfZsxNFxQlj+GJSoI9A= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; b=vudvxqJghSveNmEiVoQ2mk+kmMfr7De/k89Jx+S0JZD4xwH8Lnx4ERRrufW0POS6Kl q7wJQTJ7DD2RETTVujj407ceKBnfYRM3nFx8gnEwAnlO7yoDE2ULXgHnAmydp8IaeQDi M7nsUl5o6YPdlrReaB2Zl/SRCt3io8KR8s6Nw= Original-Received: by 10.181.197.1 with SMTP id z1mr1513525bkp.118.1234121393991; Sun, 08 Feb 2009 11:29:53 -0800 (PST) Original-Received: from Rover.local (8.106.113.82.net.de.o2.com [82.113.106.8]) by mx.google.com with ESMTPS id 28sm3795993bwz.92.2009.02.08.11.29.51 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 08 Feb 2009 11:29:53 -0800 (PST) User-Agent: Thunderbird 2.0.0.19 (Macintosh/20081209) In-Reply-To: X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.218.165; 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: 176694759 - b84bed104b9b X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.218 X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.11 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:47331 Archived-At: Peter M=FCnster schrieb: > On Sun, 8 Feb 2009, Alan Stone wrote: > = >> Re: http://wiki.contextgarden.net/System_Macros/Branches_and_Decisions >> >> What kind of emptyness do \doifempty, \doifnotempty, \doifemptyelse test= ? > = > Hello Alan, > = > Here a small test file: > = > \def\Empty{} > \def\Macro#1{argument is \doifemptyelse{#1}{empty}{full}} > \starttext > \quotation{Remember to expand it yourself where needed.} > = > \Macro{}, \Macro{blabla} > = > Nothing: \doifemptyelse{}{empty}{full} > = > \type{\Empty}: \doifemptyelse{\Empty}{empty}{full} > = > \type{all expanded}: \expanded{\doifemptyelse{\Empty}{empty}{full}} > = > \type{with \expandafter}: > \expandafter\doifemptyelse\expandafter{\Empty}{empty}{full} You can use ConTeXt's \ExpandAfter: \ExpandAfter\doifemptyelse{\Empty}{empty}{full} > \stoptext @Alan: It's better to use \doifsomething / \doifelsenothing because they work also with macro content. Wolfgang ___________________________________________________________________________= ________ If your question is of interest to others as well, please add an entry to t= he Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-cont= ext webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________= ________