[luatex] lua transliterations on the fly

Luis Rivera jlrn77 at gmail.com
Tue Jan 11 20:37:16 CET 2011


On 11 January 2011 12:43, Luis Rivera <jlrn77 at gmail.com> wrote:
> On 11 January 2011 05:18, Arthur Reutenauer
> <arthur.reutenauer at normalesup.org> wrote:
>>>                The transliteration on the fly kinda works; but as
>>> warned by Philip, I've run into trouble because of one active char,
>>> namely, ~.
>>
>>  Can't you just make tilde not active inside the \cbgreek macro?
>> Obviously it can't keep its original (non-breakable space) if you use it
>> for transliteration.
>>
>
> Well, in fact that's what I was trying to do with the \bgroup and the
> \catcode's inside \cbgreek; however, it seems that the local \catcode
> reassignments don't reach the expansion of \directlua or \scantokens
> below; perhaps I need to declare the \catcode reassignments inside the
> lua code for lgr2utf, but the documentation is still very terse on
> this subject

After a little browsing in the documentation, it seems to me that the
LuaTeX function tex.setcatcodes([global,]n,c) is the way to reassign
catcodes for characters inside lua routines, if indeed TeX's catcode
assignments are unable to reach the guts of \directlua calls. However,
without examples I'm pretty much in the dark. Any enlightenment will
surely be welcome.

Thanks in advance,

-- 
Luis Rivera
O< http://www.asciiribbon.org/ campaign



More information about the luatex mailing list