From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/78101 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: Lua conditionals fail inside \starttexdefinition Date: Tue, 4 Sep 2012 14:26:24 +0200 Message-ID: <827CE8D8-8E41-4267-B70C-FCACF6A0C2FC@gmail.com> References: <20120904142109.32f088b2@homerow> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 6.0 \(1486\)) Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1346761602 5808 80.91.229.3 (4 Sep 2012 12:26:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 4 Sep 2012 12:26:42 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Sep 04 14:26:44 2012 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1T8sDM-00065I-Cq for gctc-ntg-context-518@m.gmane.org; Tue, 04 Sep 2012 14:26:44 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 6B4D010206; Tue, 4 Sep 2012 14:26:41 +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 k2skTFke76Y1; Tue, 4 Sep 2012 14:26:39 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 7A2D9101F9; Tue, 4 Sep 2012 14:26:39 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 60688101F9 for ; Tue, 4 Sep 2012 14:26:38 +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 3pJspf0eoaBW for ; Tue, 4 Sep 2012 14:26:37 +0200 (CEST) Original-Received: from filter3-utr.mf.surf.net (filter3-utr.mf.surf.net [195.169.124.154]) by balder.ntg.nl (Postfix) with ESMTP id 693B3101F2 for ; Tue, 4 Sep 2012 14:26:37 +0200 (CEST) Original-Received: from mail-bk0-f41.google.com (mail-bk0-f41.google.com [209.85.214.41]) by filter3-utr.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id q84CQUX5025327 for ; Tue, 4 Sep 2012 14:26:36 +0200 Original-Received: by bkcjc3 with SMTP id jc3so3072689bkc.14 for ; Tue, 04 Sep 2012 05:26:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; bh=fpkke2G51J4fYqodjrc3R83heamR2AmGcixFnuHG7I8=; b=IY74eXYJkFPKfpeQ0fF9h8axJuX7jmzmtXG/Ggf7ksbVldcH364T4DsWa4HyklTVck MVxm5iJuMxKN4eIizzpDOsj3e0f8HS6pMvkv70WslQWSkL2y1rBGwlD31jxiuQFgCr2X Wm8plr3Ezsc8kPLI5TxWZQ3pZ/o/PnqI3zqeba4hDBWX0QGxPr80INARZVZrN6mnacSE i+poMinmm1SApKzR5lKESX/DjcsDvBW53pH23yRVCGpcha7rUvGyMmk63vqxdHU8xTsq 1Nl6eAfh8WXmAHl7owIonKqgvmqXqXs+DND9dcui+GcVADXAPZIecbyz8MGxQt7m4q5d hj9w== Original-Received: by 10.204.156.87 with SMTP id v23mr8264686bkw.0.1346761590222; Tue, 04 Sep 2012 05:26:30 -0700 (PDT) Original-Received: from [10.44.55.14] ([82.113.121.14]) by mx.google.com with ESMTPS id gq2sm10230662bkc.13.2012.09.04.05.26.28 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 04 Sep 2012 05:26:29 -0700 (PDT) In-Reply-To: <20120904142109.32f088b2@homerow> X-Mailer: Apple Mail (2.1486) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.214.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: 08HT0qudh - 75e9fee17edb - 20120904 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 195.169.124.154 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:78101 Archived-At: Am 04.09.2012 um 14:21 schrieb Marco Patzer : > Hi, > = > I discovered strange behaviour concerning Lua conditionals within > texdefinitions. > = > ConTeXt complains: 'then' expected near 'thenelseend'. > = > I guess it has something to do with how the content of a > texdefinitions is grabbed. Seems like a bug or is this by design? When you use the texdefinition environment to create a command the end of line character which results normally in a space is ignored sees =93thenelseend=94 as a single string, in such a case you can add a space and put a comment sign at the end of the line. > % This one fails > % \starttexdefinition mycmd > % \startluacode > % if true then > % else > % end > % \stopluacode > % \stoptexdefinition \starttexdefintion mycmd \startluacode if true then % else % end \stopluacode \stoptexdefinition 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________= ________