From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/69921 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: interfaces.definecommand Date: Tue, 12 Jul 2011 17:59:07 +0200 Message-ID: <95778D9B-0202-48B7-9EB2-E702E64BB13A@googlemail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1310486371 26557 80.91.229.12 (12 Jul 2011 15:59:31 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 12 Jul 2011 15:59:31 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Jul 12 17:59:26 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 1QgfMs-0005xv-1F for gctc-ntg-context-518@m.gmane.org; Tue, 12 Jul 2011 17:59:26 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 65FE0CAE11; Tue, 12 Jul 2011 17:59:25 +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 87wKfLOovSEk; Tue, 12 Jul 2011 17:59:19 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 51F76CADEF; Tue, 12 Jul 2011 17:59:19 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 56C48CADEF for ; Tue, 12 Jul 2011 17:59:18 +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 ecMV0bXkypX6 for ; Tue, 12 Jul 2011 17:59:16 +0200 (CEST) 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 5E1BFCADE7 for ; Tue, 12 Jul 2011 17:59:16 +0200 (CEST) Original-Received: from mail-fx0-f42.google.com (mail-fx0-f42.google.com [209.85.161.42]) by filter4-ams.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id p6CFxFiZ012906 for ; Tue, 12 Jul 2011 17:59:15 +0200 Original-Received: by fxe23 with SMTP id 23so4912346fxe.15 for ; Tue, 12 Jul 2011 08:59:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=from:content-type:content-transfer-encoding:subject:date:message-id :to:mime-version:x-mailer; bh=zJLBiLo1lVV266HzS1UYL+3SnKjcRXSeILfrJq/k5FY=; b=YODVtKsnxiJLwl6/V6W+9YPq4fzYaS8FzTRAssoLu8Kf4PDuoQP3tBGxn51kMVil+4 EO2bsMw5xcQXQDB1KwyuNane7+/I0MJr9RGUE6LiB/XOrctqLk40kgWdwbhKjYpOORNi f0GL6SmDHW58jgAlItGrfVgNf5YnhrvR1XCso= Original-Received: by 10.223.92.148 with SMTP id r20mr133516fam.45.1310486355226; Tue, 12 Jul 2011 08:59:15 -0700 (PDT) Original-Received: from [192.168.2.31] (p5B0EEA91.dip.t-dialin.net [91.14.234.145]) by mx.google.com with ESMTPS id h26sm1821445faj.11.2011.07.12.08.59.12 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 12 Jul 2011 08:59:14 -0700 (PDT) X-Mailer: Apple Mail (2.1084) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.161.42; 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: 03F73XfwX - 38f8f4e78a0f - 20110712 X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.72 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:69921 Archived-At: Hi Hans, is it possible to extend =93interfaces.definecommand=94 so that it is possi= ble to create commands without optional arguments. \starttext \startluacode function test(opt_1, arg_1) context("%s",arg_1) end interfaces.definecommand { name =3D "test", arguments =3D { { "option", "list" }, { "content", "string" }, }, macro =3D test, } \stopluacode \test{whatever} \stoptext 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 ___________________________________________________________________________= ________