[texhax] Taking apart text of macro argument

Peter Seibel peter at gigamonkeys.com
Thu May 28 07:04:23 CEST 2009


On Wed, May 27, 2009 at 9:37 PM, Philip TAYLOR (Ret'd)
<P.Taylor at rhul.ac.uk> wrote:
>
>
> Peter Seibel wrote:
>
>> I realize I could do something like:
>>
>>     \def\foo#1#2\par
>>
>> but then I can't say \foo{...}
>
> but \foo could then call an adjunct macro (say, \foohelper),
> using a delimited parameter structure :
>
> \def \foohelper #1#2\relax {...}
> \def \foo #1{\foohelper #1\relax}

Awesome! I knew there had to be some such trick but I couldn't quite
derive it myself. Thanks.

-Peter

-- 
Peter Seibel
http://www.codersatwork.com/
http://www.gigamonkeys.com/blog/


More information about the texhax mailing list