Problem centernig a table by Lua
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? Kind regards, Lukas -- Ing. Lukáš Procházka [mailto:LPr@pontex.cz] Pontex s. r. o. [mailto:pontex@pontex.cz] [http://www.pontex.cz] Bezová 1658 147 14 Praha 4 Tel: +420 244 062 238 Fax: +420 244 461 038
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 -----------------------------------------------------------------
participants (3)
-
Hans Hagen
-
luigi scarso
-
Procházka Lukáš Ing. - Pontex s. r. o.