On 13-5-2011 10:12, Procházka Lukáš Ing. - Pontex s. r. o. wrote:
Hello,
I'm typesetting a centered (middaligned) 1-cell table by Ctx - no problem.
When I rewrite the same code to Lua, the table is always moved to the right; see or try the attached files.
--- \starttext % By TeX
\centerline{ \starttable[|c|] \HL \VL 5 \VL\AR \HL \stoptable }
% By Lua
\startluacode context([[\centerline{]]) context.starttable{"|c|"} context.HL() context.VL(5); context.VL(); context.AR() context.HL() context.stoptable() context([[}]]) \stopluacode \stoptext ---
Why? How to modify the Lua code?
You also need to modify the tex code (space after {) \starttext % By TeX \centerline{% \starttable[|c|] \HL \VL 5 \VL\AR \HL \stoptable } % By Lua \startluacode context.centerline(function() context.starttable{"|c|"} context.HL() context.VL(5) context.VL() context.AR() context.HL() context.stoptable() end) \stopluacode \stoptext ----------------------------------------------------------------- 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 -----------------------------------------------------------------