From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/31211 Path: news.gmane.org!not-for-mail From: Henning Hraban Ramm Newsgroups: gmane.comp.tex.context Subject: programming: doifdefined & friends Date: Thu, 5 Oct 2006 02:42:35 +0200 Message-ID: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1160009883 9086 80.91.229.2 (5 Oct 2006 00:58:03 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 5 Oct 2006 00:58:03 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Thu Oct 05 02:57:53 2006 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 ciao.gmane.org with esmtp (Exim 4.43) id 1GVHLo-0004aK-Qc for gctc-ntg-context-518@m.gmane.org; Thu, 05 Oct 2006 02:44:38 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 3810D1FE6E; Thu, 5 Oct 2006 02:44:34 +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 12223-06; Thu, 5 Oct 2006 02:44:33 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 1D3A11FE62; Thu, 5 Oct 2006 02:42:47 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 4BDD41FE62 for ; Thu, 5 Oct 2006 02:42:44 +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 12223-05 for ; Thu, 5 Oct 2006 02:42:39 +0200 (CEST) Original-Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.186]) by ronja.ntg.nl (Postfix) with SMTP id A638A1FE1A for ; Thu, 5 Oct 2006 02:42:38 +0200 (CEST) Original-Received: from [62.203.223.199] (helo=[10.128.9.3]) by mrelayeu.kundenserver.de (node=mrelayeu2) with ESMTP (Nemesis), id 0MKwtQ-1GVHJt3eVO-0003Om; Thu, 05 Oct 2006 02:42:38 +0200 Original-To: ConTeXt ML X-Mailer: Apple Mail (2.752.2) X-Provags-ID: kundenserver.de abuse@kundenserver.de login:71ece21a21b2fa6ef1812787a4eaee0e X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.7 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:31211 Archived-At: While I can't cope with counters, I'm trying other stuff that I don't understand: How must I use \doifdefined & friends? Consider this snippet: ----- \starttext \def\myvar{JAJAJA} \input tufte \doifdefined{\myvar}{\par bla \myvar blub\par} \input tufte \stoptext ----- I'd guess it would print "bla JAJAJAblub" between the two Tufte texts and don't if I comment \def\myvar. But I guess wrongly: It does nothing in this case, and complains about undefined \myvar in the latter. But if I really want to check if something is defined before I try to use it, how must I write it? (Expansion magic?) Greetlings from Lake Constance! Hraban --- http://www.fiee.net/texnique/ http://contextgarden.net http://www.cacert.org (I'm an assurer)