[NTG-context] Creating TeX dimensions and counters registers directly in Lua

2012-08-22 Thread Jaroslav Hajtmar
Hello all, Is it possible to create a new dimension ConTeXt register directly in Lua, or I have to first create the ConTeXt dimensional register and then to subsequently assign it a value? Here is example: \starttext \newdimen\mydimension \directlua{tex.setdimen(mydimension, 123)}

Re: [NTG-context] Creating TeX dimensions and counters registers directly in Lua

2012-08-22 Thread Wolfgang Schuster
Am 22.08.2012 um 09:19 schrieb Jaroslav Hajtmar hajt...@gyza.cz: Hello all, Is it possible to create a new dimension ConTeXt register directly in Lua, or I have to first create the ConTeXt dimensional register and then to subsequently assign it a value? Here is example: \starttext

Re: [NTG-context] Creating TeX dimensions and counters registers directly in Lua

2012-08-22 Thread Jaroslav Hajtmar
Thanks Wolfgang for the reply, but I must have misunderstood. My point is, that TeX registers was subsequently visible and usable in TeX (eg for width or height of boxes, etc.) Eg. for example, \the\mydimension can see that this does not occur! In addition, I solve the problem at LuaTEX, so

Re: [NTG-context] Creating TeX dimensions and counters registers directly in Lua

2012-08-22 Thread Hans Hagen
On 22-8-2012 11:09, Jaroslav Hajtmar wrote: Thanks Wolfgang for the reply, but I must have misunderstood. My point is, that TeX registers was subsequently visible and usable in TeX (eg for width or height of boxes, etc.) Eg. for example, \the\mydimension can see that this does not occur! In

Re: [NTG-context] Creating TeX dimensions and counters registers directly in Lua

2012-08-22 Thread Peter Münster
On Wed, Aug 22 2012, Jaroslav Hajtmar wrote: \ctxlua{myluadimension = number.topoints(1)} \ctxlua{context(myluadimension)} \def\myluadimension{\ctxlua{context(myluadimension)}} ... \hbox to\myluadimension{X} -- Peter

Re: [NTG-context] Creating TeX dimensions and counters registers directly in Lua

2012-08-22 Thread Jaroslav Hajtmar
Thank to Hans and Peter too. It works in context fine now. I would like realize this same in pure LuaTeX. I was primarily in the query for it to find Lua equivalent of TeX primitives \newdimen and \newcount (for direct creating new TeX registers) I could use something like

Re: [NTG-context] Creating TeX dimensions and counters registers directly in Lua

2012-08-22 Thread Jaroslav Hajtmar
Great!!! Thanx very much Hans... Normally I do all things in ConTeXt, but I am preparing a beginning tutorial for users of LaTeX and PlainTeX, who would be interested in getting to know the basics LuaTEX. Therefore I am seeking a solution applicable in LuaLaTeX and LuaPlain too. Jaroslav