From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/43698 Path: news.gmane.org!not-for-mail From: "Thomas A. Schmitz" Newsgroups: gmane.comp.tex.context Subject: system macros/doquadrupleemtpy Date: Wed, 3 Sep 2008 16:41:00 +0200 Message-ID: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v926) Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1220458193 17941 80.91.229.12 (3 Sep 2008 16:09:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 3 Sep 2008 16:09:53 +0000 (UTC) To: mailing ConTeXt users list for Original-X-From: ntg-context-bounces@ntg.nl Wed Sep 03 18:10:44 2008 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 lo.gmane.org with esmtp (Exim 4.50) id 1Kauw3-0007Il-4n for gctc-ntg-context-518@m.gmane.org; Wed, 03 Sep 2008 18:10:23 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 453131FE84; Wed, 3 Sep 2008 18:09:16 +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 03213-05-27; Wed, 3 Sep 2008 18:08:19 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 68D041FE6C; Wed, 3 Sep 2008 17:20:33 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id D62A71FE06 for ; Wed, 3 Sep 2008 17:20:08 +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 17861-05-52 for ; Wed, 3 Sep 2008 17:19:07 +0200 (CEST) Original-Received: from mailout02.t-online.de (mailout02.t-online.de [194.25.134.17]) by ronja.ntg.nl (Postfix) with ESMTP id BB23D1FE95 for ; Wed, 3 Sep 2008 16:41:20 +0200 (CEST) Original-Received: from fwd34.aul.t-online.de by mailout02.sul.t-online.de with smtp id 1KatXs-0006Qv-01; Wed, 03 Sep 2008 16:41:20 +0200 Original-Received: from [192.168.0.2] (GtyQ7sZZZhF2uqE4Hwl6aokbmfM408IkpMaggIepVWE4N9-oHLbVkubTJW7Cx3VZQN@[87.178.101.217]) by fwd34.aul.t-online.de with esmtp id 1KatXZ-0vOXuS0; Wed, 3 Sep 2008 16:41:01 +0200 X-Mailer: Apple Mail (2.926) X-ID: GtyQ7sZZZhF2uqE4Hwl6aokbmfM408IkpMaggIepVWE4N9-oHLbVkubTJW7Cx3VZQN@t-dialin.net X-TOI-MSGID: eeff8c9d-d150-4f0d-b363-cc5c1d363a3c X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.9 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:43698 Archived-At: Hi all, I'm trying to define a macro \Command which can either have four or five arguments. If it has five, I want to define them as \Command1[#1][#2][#3][#4]{#5} if it has four, as \Command2[#1][#2][#3]{4#} I thought this would be the way to go: \def\Command{% \doquadrupleempty\doCommand} \def\doCommand{% \iffifthargument% \doquadrupleargument\Command1% \else% \dotripleargument\Command2% \fi} but that gives me errors about "too many }s". So I'm wondering: am I on the wrong track? Can this be done at all? Thanks, and best Thomas ___________________________________________________________________________________ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________