![](https://secure.gravatar.com/avatar/49e63acb01f2ca80efce7eed08310ce8.jpg?s=120&d=mm&r=g)
On 26-7-2010 8:36, Jaroslav Hajtmar wrote:
Hello all,
Is there any possibility use Lua commands in \startseparatedlist[NaturalTable] ... \stopseparatedlist environment in database module? I would like using database module im my Lua application. Thanx Jaroslav
Here is mimimal example:
\usemodule[database]
\defineseparatedlist [NaturalTable] [separator=comma, before=\bTABLE,after=\eTABLE, first=\bTR,last=\eTR, left=\bTD,right=\eTD]
\starttext
\startseparatedlist[NaturalTable] col1,col2,col3 \stopseparatedlist
\startseparatedlist[NaturalTable] \directlua{tex.print("col1,col2,col3")} % here program fails \stopseparatedlist
\stoptext
you could expand the content \expanded{\startseparatedlist[NaturalTable] \ctxlua{tex.print("col1,col2,col3")}} \stopseparatedlist or use \startluacode context.startseparatedlist { "NaturalTable" } tex.print("col1,col2,col3") context.stopseparatedlist() \stopluacode of course you can also do all at the lua end (reminds me that I promised mojca to rewrite the database module) ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------