[luatex] Passing verbatim text to a function

Sietse Brouwer sbbrouwer at gmail.com
Thu Sep 30 21:56:44 CEST 2010


Ha die Diederick,

> Some notes (hope I'm not misreading the code, dont know lua):
> - in the first environment block, you're using thirddata.verbatim, not
> thirddata.dedent, is that right?

> - in that block and in the macro block, the lua function is called
> with two input arguments, while thirddata.dedent only takes 1 (i can
> only guess about thirddata.verbatim).

Ah, both good catches. Hangovers from previous versions. All fixed now, ta.

> I just note that the wiki can really use some better syntax
> highlighting btw (or would that be my IE7 on windows XP issue?).

On which note: I should probably hack up a Vim syntax file that does
interweaved ConTeXt and Lua highlighting. One of these days, perhaps.
If anyone else gets the jones first, don't hesitate --- you'll
probably beat me to it. :-)

--Sietse

--
Sietse Brouwer -- sbbrouwer at gmail.com -- +31 6 13456848
Wildekamp 32 -- 6721 JD Bennekom -- the Netherlands
MSN: sietse at gawab.com -- ICQ: 341232104



On Thu, Sep 30, 2010 at 02:39, Diederick C. Niehorster
<dcnieho at gmail.com> wrote:
> Hoi Sietse,
>
> Very readable to me, who doesn't know much about this stuff, so good work.
>
> Some notes (hope I'm not misreading the code, dont know lua):
> - in the first environment block, you're using thirddata.verbatim, not
> thirddata.dedent, is that right?
> - in that block and in the macro block, the lua function is called
> with two input arguments, while thirddata.dedent only takes 1 (i can
> only guess about thirddata.verbatim).
>
> I just note that the wiki can really use some better syntax
> highlighting btw (or would that be my IE7 on windows XP issue?).
>
> Best,
> Dee
>
> On Thu, Sep 30, 2010 at 06:18, Sietse Brouwer <sbbrouwer at gmail.com> wrote:
>> Hi Wolfgang, all,
>>
>> On Tue, Sep 28, 2010 at 06:24, Wolfgang Schuster
>> <schuster.wolfgang at googlemail.com> wrote:
>>>
>>> \def\startone
>>>  {\begingroup
>>>   \obeylines
>>>   \dostartone}
>>>
>>> \def\dostartone#1\stopone
>>>  {\ctxlua{thirddata.one(...)}%
>>>   \endgroup}
>>
>> That works. Marvellous. Thank-you very much. Apologies for the delay
>> in replying --- I was working on writing up your advice for the wiki,
>> with some comments and explantions for the novice. The result is here:
>> http://wiki.contextgarden.net/Programming_in_LuaTeX#Getting_text_into_LuaTex_verbatim
>> Should anyone feel like giving it a once-over: corrections are humbly solicited.
>>
>> Kind regards,
>>
>> Sietse Brouwer
>>
>>
>
>



More information about the luatex mailing list