[luatex] A Lua Programmers Guide or Reference for Context
Wolfgang Schuster
wolfgang.schuster at gmail.com
Thu Jan 24 18:35:54 CET 2013
Am 24.01.2013 um 11:03 schrieb Keith J. Schultz <schultzk at gmx.net>:
> Hi Everyone,
>
> I am looking for a Reference on the ConTeXt commands that can be used
> on the Lua side.
>
> Take the sample code from Hans:
>
> \definecolor[bluegreen][h=4F6F6F]
> \definecolor[bluered][h=6F4F6F]
> \startTEXpage
> \startluacode
> local colored = {
> background = "color",
> backgroundcolor = "bluegreen",
> foregroundcolor = "white",
> }
> local basespec = {
> framecolor = "bluered",
> align= "middle",
> style = "type",
> offset=".5ex",
> }
> local bTR, eTR = context.bTR, context.eTR
> local bTD, eTD = context.bTD, context.eTD
> context.bTABLE(basespec)
> for i=1,10 do
> bTR()
> for i=1,20 do
> local r= math.random(100)
> bTD((r < 50 and colored) or nil)
> context("%#2i",r)
> eTD()
> end
> eTR()
> end
> context.eTABLE()
> \stopluacode
> \stopTEXpage
>
> I can understand what happen here:
> context.bTable equates to \starttable[...]
> context.bTR() start a new row
> context..bTD() starts a new cell
> ...
>
> My question is were can I find a list of such Lua-context commands and their APIs?
http://www.pragma-ade.com/show-man-44.htm
Wolfgang
More information about the luatex
mailing list