Subject: | |
From: | |
Reply To: | |
Date: | Sat, 18 Sep 2010 16:25:08 +0930 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
On 18/09/2010, at 7:04 AM, Uwe Lueck wrote:
> Will Robertson <[log in to unmask]>, 17.09.2010 07:21:30:
>>
>> \def\foo{...
>> \lccode`#1=`\~
>
> ! Illegal parameter number in definition of \foo.
>
> And according to my own experience, it must be \lccode`\~=`#1...,
> cf. doc.sty \@sverb/\do@noligs and below.
Oops, yes, that's of course what I meant :) I was writing off the cuff (and the \def\foo was implied to be inside another macro, say).
On 18/09/2010, at 9:03 AM, Heiko Oberdiek wrote:
> \providecommand*{\MakeActiveDef}[1]{%
> \catcode`#1\active
> \begingroup
> \lccode`\~`#1%
> \lowercase{\endgroup \def ~}%
> }
Ah, this is nice. Better than what I was thinking of as you no longer need a stray active character floating around.
I've added these tentatively to expl3 in the "candidates" module under the names \char_active_set:Npn, \char_active_set_eq:NN, and so on.
Thanks Uwe and Heiko,
-- Will
|
|
|