Hi Peter,

thanks for your reply, and I'll keep the bit about goat milk in mind :-).


"frame=" .. tostring(framestate)

It has the advantage of making the example compile. It has the drawback of not doing anything :-)

seems to work. Anyhow, if you are planning to do some more complex
stuff, you should separate the lua from the tex code.

The advantages are
- no catcode limitations
   Then you can use nice stuff like
   string.format("frame=%s",framestate)
- in case of lua errors you get the real line number
- lua syntax check is possible

Load the lua code at the beginning of your tex file with

\registerctxluafile{filename_without_suffix}{version number or empty}

One last but important tip: if you get lua errors like 'undefined
whatever', check your lua file with 'luatexc -p foo.lua' (lua compiler).
A single syntax error in the lua file and all of its content is ignored!
Can be quite frustrating to find the error cause, if all of your lua
code is undefined right from the beginning.

OK, that sounds like very good advice - I'll see if I can manage to apply this for xml style sheets.

Thanks a lot, and best wishes

Thomas
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to