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 o8IGPdQ4011914 for ; Sat, 18 Sep 2010 18:25:40 +0200 Received: (qmail 15023 invoked by alias); 18 Sep 2010 16:25:34 -0000 Delivered-To: GMX delivery to rainer.schoepf@gmx.net Received: (qmail invoked by alias); 18 Sep 2010 16:25:33 -0000 Received: from relay2.uni-heidelberg.de (EHLO relay2.uni-heidelberg.de) [129.206.210.211] by mx0.gmx.net (mx032) with SMTP; 18 Sep 2010 18:25:33 +0200 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 o8IGOLSQ017575 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 18 Sep 2010 18:24:22 +0200 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 o8IDexEX020290; Sat, 18 Sep 2010 18:23:54 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 443207 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Sat, 18 Sep 2010 18:23:54 +0200 Received: from relay.uni-heidelberg.de (relay.uni-heidelberg.de [129.206.100.212]) by listserv.uni-heidelberg.de (8.13.1/8.13.1) with ESMTP id o8IGNsFD005497 for ; Sat, 18 Sep 2010 18:23:54 +0200 Received: from fmmailgate05.web.de (fmmailgate05.web.de [217.72.192.243]) by relay.uni-heidelberg.de (8.14.1/8.14.1) with ESMTP id o8IGNFIk015474 for ; Sat, 18 Sep 2010 18:23:19 +0200 Received: from mwmweb012 ( [172.20.18.21]) by fmmailgate05.web.de (Postfix) with ESMTP id 6493C629A88E; Sat, 18 Sep 2010 18:23:42 +0200 (CEST) Received: from [212.23.105.116] by mwmweb012 with HTTP; Sat Sep 18 18:23:42 CEST 2010 References: <0BFA7483-6E3E-45D0-9094-3DEE5D880A1E@gmail.com> <1816801436.1740507.1284759290533.JavaMail.fmail@mwmweb010>, <20100917233351.GA18324@oberdiek.my-fqdn.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-UI-Message-Type: mail X-UI-ATTACHMENT-ID-POSTFIX: b07b93da-fe89-447d-93ad-7a147e454d1e Content-Transfer-Encoding: 7bit X-Priority: 3 Importance: normal Sensitivity: Normal X-Provags-ID: V01U2FsdGVkX19o/lFQFay+xTjqwetWkqomsh22g26TwqlqF/ZdtKN766hVj+3YYGvh iRlkc9wKgn/QURSIXbGUxU0fGT4+FJ+Z/unLqHs2lIk= Message-ID: <1458322901.1855783.1284827022401.JavaMail.fmail@mwmweb012> Date: Sat, 18 Sep 2010 18:23:42 +0200 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Uwe Lueck Subject: Re: Consistently active characters To: LATEX-L@listserv.uni-heidelberg.de In-Reply-To: <20100917233351.GA18324@oberdiek.my-fqdn.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/syJmiNoEBJhgjYKpglu1TZLLw7xMZnJMXwBFy+Sxe D/AUQGQOurK3ezVJqUBFH0uN5pjmWoMfpyHp50EZ60/Y6hM43eiKLTaE/W0dI7nIn8+pr4SzneyH Jeytg==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: 6411 Heiko Oberdiek , 18.09.2010 01:33:51: >On Fri, Sep 17, 2010 at 11:34:50PM +0200, Uwe Lueck wrote: [...] >> Not tested exactly this way, sorry, but in a so far private package of mine, I have >> >> \providecommand*{\MakeActiveDef}[2]{% >> \catcode`#1\active >> \begingroup >> \lccode`\~`#1% >> \lowercase{\endgroup \def ~{#2}}% >> } > > But then the contents of #2 is converted to lowercase, too. > The trick is to move the (parameter text and) definition text > outside of \lowercase: > > \providecommand*{\MakeActiveDef}[2]{% > \catcode`#1\active > \begingroup > \lccode`\~`#1% > \lowercase{\endgroup \def ~}{#2}% > } I wanted to try this in my package ... actually it has been there already; I seem not to have pasted (which is somewhat clumsy with my favourite editor under Hatari), rather changed similar code of previous mails. So this shows that Heiko's proposal already has been tested and he is right! > or even > > \providecommand*{\MakeActiveDef}[1]{% > \catcode`#1\active > \begingroup > \lccode`\~`#1% > \lowercase{\endgroup \def ~}% > } > > The latter allows definition of active chars with parameters: > > \MakeActiveDef{\+}#1{Do something with #1} Anyway, I usually consider definitions like \newcommand*{\foo}[2]{{#2}} mistakes and type \newcommand*{\foo}[1]{} instead, maybe I didn't realize it here -- indeed I change my \MakeActiveDef according to Heiko's proposal ... tested successfully! Thanks, cheers, Uwe.