[Dev-luatex] Assignments in TeX's mouth, or: "Dr. Zaius, it can talk!"

Hans Hagen pragma at wxs.nl
Tue Aug 14 11:56:11 CEST 2007


Jonathan Sauer wrote:

> I do not think that assignments to TeX's registers done in Lua code
> should be automatically \global, as it makes writing macros without
> (intentioned) side-effects much harder. And those macros are the best,
> since they can be used anywhere without having to remember that they
> clobber register \foo, redefine macro \bar et cetera.

since we have now a nearly unlimited amount of registers one can define 
dedicated counters for tasks and treat them global also withing the tex 
code

> So, returning to this mail's subject, I can only say: "Take your hands
> off my grouping, you damn dirty Lua code!" ;-)

well, don't use tex.count then -)  often the same can be accomplished by:

    tex.sprint("\\count123=",value)

which will honor grouping, or a variant of this

    \count123=\directlua0{... tex.sprint(value) }

introducing a grouping model in lua itself is messy; one has to live 
with the fact that both languages hav edifferent models; actually, once 
there is mplib, there is yet another grouping model -)


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------


More information about the dev-luatex mailing list