>           Do I pick up any beginners book on Lua?

  There really is only one beginners book on Lua :-)  _Programming in
Lua_, by Roberto Ierusalimschy, the Lua author.  There are a few other
books, mostly about "Lua and games", because Lua has become quite
popular in the gamers' community, but Roberto's book is really excellent
and makes a good tutorial.

> For example, one of the lines in the code is 
> 
>  tprint = function(s) tex.sprint(tex.ctxcatcodes,s) end 
> 
> Is this Lua or LuaTex?

  The question does not really makes sense if you put it that way.  This
line of code is pure Lua, it is completely syntactically correct; but
you can't use as it a standalone Lua script, because it uses functions
that only LuaTeX and ConTeXt define (think of it as the action of
"import" in Python, except that here it's not available as a stand-alone
library call; it's built into LuaTeX).

  Hence, if you want to become proficient in Lua programming in ConTeXt,
you need to learn:

  * The Lua programming language, with its core libraries (covered in
    the aforementioned book).

  * The Lua libraries that LuaTeX adds to Lua, documented in the LuaTeX
    manual.

  * The Lua libraries that ConTeXt adds to LuaTeX.

  The above line of code is really a mixture of the three, but in any
case, the ground stone is always Lua.

        Arthur
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to