Received: from mx0.gmx.net (mx0.gmx.net [213.165.64.100]) by h1439878.stratoserver.net (8.14.2/8.14.2/Debian-2build1) with SMTP id oBUG3qZv014287 for ; Thu, 30 Dec 2010 17:03:53 +0100 Received: (qmail 6835 invoked by alias); 30 Dec 2010 16:03:47 -0000 Delivered-To: GMX delivery to rainer.schoepf@gmx.net Received: (qmail invoked by alias); 30 Dec 2010 16:03:46 -0000 Received: from relay2.uni-heidelberg.de (EHLO relay2.uni-heidelberg.de) [129.206.210.211] by mx0.gmx.net (mx084) with SMTP; 30 Dec 2010 17:03:46 +0100 Received: from listserv.uni-heidelberg.de (listserv.uni-heidelberg.de [129.206.100.94]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id oBUG21OS014599 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 30 Dec 2010 17:02:01 +0100 Received: from listserv.uni-heidelberg.de (localhost.localdomain [127.0.0.1]) by listserv.uni-heidelberg.de (8.13.1/8.13.1) with ESMTP id oBTN13Ji023833; Thu, 30 Dec 2010 17:01:53 +0100 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 772310 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Thu, 30 Dec 2010 17:01:53 +0100 Received: from relay2.uni-heidelberg.de (relay2.uni-heidelberg.de [129.206.210.211]) by listserv.uni-heidelberg.de (8.13.1/8.13.1) with ESMTP id oBUG1qmT024656 for ; Thu, 30 Dec 2010 17:01:52 +0100 Received: from fmmailgate05.web.de (fmmailgate05.web.de [217.72.192.243]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id oBUG1Z6T014398 for ; Thu, 30 Dec 2010 17:01:39 +0100 Received: from mwmweb012 ( [172.20.18.21]) by fmmailgate05.web.de (Postfix) with ESMTP id AF51D643858C; Thu, 30 Dec 2010 17:01:35 +0100 (CET) Received: from [46.114.93.78] by mwmweb012 with HTTP; Thu Dec 30 17:01:35 CET 2010 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-UI-Message-Type: mail X-UI-ATTACHMENT-ID-POSTFIX: 205d9960-e26c-4a74-bc4c-74042ea066d6 X-Priority: 3 Importance: normal Sensitivity: Normal X-Provags-ID: V01U2FsdGVkX1+/Aj2BSOrZxLMU7me2248EF2ThR82+UwaI17+y+U3rhsVCqKncS2fE Kb1sD1FGENqD8th62ffNUUahrNq9OH/jn+/s5/cdD8c= Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by listserv.uni-heidelberg.de id oBUG1qmT024657 Message-ID: <1713005794.1189899.1293724895711.JavaMail.fmail@mwmweb012> Date: Thu, 30 Dec 2010 17:01:35 +0100 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Uwe Lueck Subject: variable opt arg delimiters [was: Defining a ...] To: LATEX-L@listserv.uni-heidelberg.de Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: X-GMX-Antispam: 0 (Mail was not recognized as spam); Detail=5D7Q89H36p6i75npGen84eVAEFK/syJmFuaL1OLtauwJ5R/kaZ9HAe8peGX1DeqJL7BW4 1X28hmBsSaikXt0ebYfUaHmtXkk7HChP+4IT8tI+yodefY66PMpp/kPudTSzX7BVqDxUGU4uAf/y ckanA==V1; X-Resent-By: Forwarder X-Resent-For: rainer.schoepf@gmx.net X-Resent-To: rainer@rainer-schoepf.de Status: R X-Status: X-Keywords: X-UID: 6480 I wrote: > A better proposal than using different category codes is > programming macros with optional arguments obeying > a convention that makes a choice of delimiters available to users. > Any macro package replacing \@ifnextchar[ by some > \ifx\let@token\opt@arg@delim could be run this way. > > If no LaTeXY will adopt this, I will call it LüTeX :-) I had thought of posting such a "feature request" earlier, refrained from it for not having found a good idea how to implement it. If I now found it so simple, I must have overlooked a problem ... This would mean that so many \foo in the LaTeX kernel reading their optional argument by \@foo[#1] must be replaced. At least I have now thought how such macros would have to look like instead (sketch, \SetOptArgDels chooses delimiters, \foo is an example command with one optional argument): \def\SetOptArgDels#1#2{% \let\opt@arg@del@l#1% \def\read@pass@opt@arg##1#1##2#2{##1{##2}}} \def\foo{% \@ifnextchar\opt@arg@del@l {\read@pass@opt@arg\@foo}% {\@foo{DEFAULT}}} \def\@foo#1... -- where one had \def\@foo[#1]... so far. Maybe this already is in xparse? Sorry, I cannot afford more right now ... Fortunately, 1. there would be no need to change preamble-only commands, 2. as I realize at reading Heiko's comment, the "ambiguity" only arises with macros whose *last* (e.g., only) arguments are optional. Cheers, Uwe.