From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/78444 Path: news.gmane.org!not-for-mail From: Sietse Brouwer Newsgroups: gmane.comp.tex.context Subject: \define a command with square-bracket arguments Date: Thu, 27 Sep 2012 17:45:35 +0200 Message-ID: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1348760765 10628 80.91.229.3 (27 Sep 2012 15:46:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 27 Sep 2012 15:46:05 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Sep 27 17:46:10 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 1THGHv-0008PX-TJ for gctc-ntg-context-518@m.gmane.org; Thu, 27 Sep 2012 17:46:07 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 8BFBA101E9; Thu, 27 Sep 2012 17:46:02 +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 nTgc77NmPHV8; Thu, 27 Sep 2012 17:46:01 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id EF35B101E6; Thu, 27 Sep 2012 17:46:00 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 2EAC4101E6 for ; Thu, 27 Sep 2012 17:45:59 +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 g-o8cwYBqqCh for ; Thu, 27 Sep 2012 17:45:57 +0200 (CEST) Original-Received: from filter5-til.mf.surf.net (filter5-til.mf.surf.net [194.171.167.221]) by balder.ntg.nl (Postfix) with ESMTP id 13D73101E2 for ; Thu, 27 Sep 2012 17:45:57 +0200 (CEST) Original-Received: from mail-ie0-f169.google.com (mail-ie0-f169.google.com [209.85.223.169]) by filter5-til.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id q8RFh7qM014657 for ; Thu, 27 Sep 2012 17:43:08 +0200 Original-Received: by ied10 with SMTP id 10so6038856ied.14 for ; Thu, 27 Sep 2012 08:45:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=WNFVtXIBOB0FMUIrjsuN0jTV4cmiqtSogEZEWpoQQak=; b=S5YZMQcigJ0FHjV6cZLgL5QfW0k52zKrVwRTk8eN2GUtg/FRtpav12BsAlNVlJhXf1 YjinzrO/F4QLGjbHYbdcZ9RYKi3ddQ057nTr0v28ciMWf/6C/1j5L1qrnbGvZgKc03Ph AgoWxmfuSGJ3Hs5W6FqQHT99iegFzDNpkdZ+ig3slmWiYvCDi4bP33I/rHq3gooxnDBZ dK2SZ41XPMifsCZNtA5uRgQCPO+yFHdELL/b1VuQsi4fUdB1jlU2VWfV8ZKjAGfZzYIf F1L5/f9uVnCnJkOJEQXSImAkHwtGOBI9+OVaXaSlq1NFCMH5aGCAZbv1mxItdLu5c/nU PfXQ== Original-Received: by 10.42.201.140 with SMTP id fa12mr3305987icb.12.1348760755584; Thu, 27 Sep 2012 08:45:55 -0700 (PDT) Original-Received: by 10.64.31.67 with HTTP; Thu, 27 Sep 2012 08:45:35 -0700 (PDT) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.223.169; 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: 0WI4fH868 - fab57895f4a9 - 20120927 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.221 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:78444 Archived-At: Hi all, As I understand it, \define[2] is preferred over \def#1#2 because it refuses to overwrite existing commands. \define[2]\mycommand{code code code} defines a command to be invoked with \mycommand{...}{...} Can I use \define, or a related command, to define a command that takes square-bracket arguments, like so: \mycommand[...][...] ? When I type \define[1][2]\mycommand{code code code} that doesn't work. Cheers, Sietse ___________________________________________________________________________________ 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 ___________________________________________________________________________________