[luatex] Changing catcodes in \directlua

Steve Hafner steve.b.hafner at gmail.com
Wed Jul 7 05:48:03 CEST 2010


On Tue, Jul 6, 2010 at 9:17 AM, Taco Hoekwater <taco at elvenkind.com> wrote:
>
> Hi,
>
> On 07/06/2010 04:05 PM, Steve Hafner wrote:
>>
>>
>> --------------------------------------------------------------------------------
>>  \def\obeylualines
>>    {\obeylines
>>     \obeyspaces}
>
> Should be fine. There is tiny difference in the line end
> handling, but I doubt it matters any in practice.
>
>> \long\def\dodostartluacode#1\stopluacode
>>   {\expanded{\endgroup\noexpand\directlua{#1}}}
>
> That is fine. Unless you have named the lua instance, you don't need
> \zerocount (and if you did not understand that remark, you didn't).
>
>> \def\startluacode{\dostartluacode}
>> % this was
>> %\unexpanded\def\startluacode{\dostartluacode}
>
> The \unexpanded can be useful if you have \startluacode ... \stopluacode
> inside expandable things like \write or \edef, otherwise irrelevant.
>
> Best wishes,
> Taco
>

Thank you, Taco.

--steve



More information about the luatex mailing list