From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/85098 Path: news.gmane.org!not-for-mail From: =?UTF-8?Q?G=C3=A9ry_Ogam?= Newsgroups: gmane.comp.tex.context Subject: How to test the emptyness of a variable? Date: Tue, 5 Nov 2013 00:42:19 +0100 Message-ID: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0364266567==" X-Trace: ger.gmane.org 1383608540 998 80.91.229.3 (4 Nov 2013 23:42:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 4 Nov 2013 23:42:20 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Tue Nov 05 00:42:26 2013 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([5.39.185.229]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VdTms-0004eg-HV for gctc-ntg-context-518@m.gmane.org; Tue, 05 Nov 2013 00:42:26 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 62DE510221; Tue, 5 Nov 2013 00:42:25 +0100 (CET) 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 V9QrWYxgMTNT; Tue, 5 Nov 2013 00:42:23 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 70BF3101EF; Tue, 5 Nov 2013 00:42:23 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 24DAB101EF for ; Tue, 5 Nov 2013 00:42:22 +0100 (CET) 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 x4D7d8tk8eKv for ; Tue, 5 Nov 2013 00:42:20 +0100 (CET) Original-Received: from filter4-ams.mf.surf.net (filter4-ams.mf.surf.net [192.87.102.72]) by balder.ntg.nl (Postfix) with ESMTP id 61D49101E5 for ; Tue, 5 Nov 2013 00:42:20 +0100 (CET) Original-Received: from mail-we0-x233.google.com (mail-we0-x233.google.com [IPv6:2a00:1450:400c:c03::233]) by filter4-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id rA4NmQ6O017455 for ; Tue, 5 Nov 2013 00:48:26 +0100 Original-Received: by mail-we0-f179.google.com with SMTP id w61so2743197wes.38 for ; Mon, 04 Nov 2013 15:42:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=Z6yaiGJY9hkpb+wTHmSe+UAWtGt2dizC3Fl+b1LVIzs=; b=AePbvhlZbuxUI2a+krSNcTJ818mAwZfFLy31s+QJ/BJy2+/vea5ujSYrsiOPGQY66X 9LmTfJuiZzbwVkDush7flGGqlsID7DA6gCj210VZfgcLzU/F59GHTuX42P7yeD17mgPn ybWFVQDeGOs+k1bq6G1W2CoXCialygQkaAWFieULRYKjXTapGNGKaSrOfAxwyRJv0N/5 MsW8bZGzL9apS5YJFIY+XQlqgtZOr5JYUTVssGp494hskP+n8osgxucbb7BVJjPwJBrf m+d3H48+CqZ7m05TgAAjp/F0iPcTzlNOB6jScHobNN+KlkspDe24DIs/qHOXKyD7iD0J Sh5g== X-Received: by 10.180.198.5 with SMTP id iy5mr14358579wic.45.1383608539243; Mon, 04 Nov 2013 15:42:19 -0800 (PST) Original-Received: by 10.216.244.4 with HTTP; Mon, 4 Nov 2013 15:42:19 -0800 (PST) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=2a00:1450:400c:c03::233; country=IE X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 01KJzMqln - ae224af26851 - 20131105 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:85098 Archived-At: --===============0364266567== Content-Type: multipart/alternative; boundary=047d7b624e2a7d6c4804ea6277f2 --047d7b624e2a7d6c4804ea6277f2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hello, How to test if the current structure label is empty? The following example does not work because I don=E2=80=99t know how to expand the variable \currentstructurelabel. E.g.: \define \MyCommand{\doifempty{\currentstructurelabel}{Do something}} Best regards. --047d7b624e2a7d6c4804ea6277f2 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hello,


How to test if th= e current structure label is empty? The following example does not work bec= ause I don=E2=80=99t know how to expand the variable \currentstructurelabel= .

E.g.:

\define \MyCommand{= \doifempty{\currentstructurelabel}{Do something}}


Best regards.
--047d7b624e2a7d6c4804ea6277f2-- --===============0364266567== 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 ___________________________________________________________________________________ --===============0364266567==--