On 14-12-2010 12:25, Procházka Lukáš Ing. - Pontex s. r. o. wrote:
Hello,
I encountered a strange effect. Let's have a code that generates the same math, firstly by Ctx and secondly by Lua:
--- \starttext \startformula M_{t,WnT} = 1000 \stopformula
\startluacode context.startformula() context("M_{t,WnT} = 1000") context.stopformula() \stopluacode \stoptext ---
You can see the result - the space between "W" and "n" in lower index is smaller when generated (natively) by Ctx than that in math generated by Lua. (The latter case may affect a bit "disturbingly" to the reader.)
It seems also that space between (subscript) "T" and "=" varies.
So why these differences? How to avoid the extra-space when Lua generates math subscript?
actually, the luacode was doing the right thing as there is a protect/unprotect mismatch (will be fixed); putting this at the top of you file works: \catcodetable\ctxcatcodes I have no clue yet where the space comes from (that's taco's speciality) Hans ----------------------------------------------------------------- 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 -----------------------------------------------------------------