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)}
\stoptext

works fine, but all like:

\starttext
    \directlua{tex.print([[\newdimen\myotherdimension]])}
    \directlua{tex.setdimen("myotherdimension", 123)}
    \directlua{tex.newdimen("myotherdimension")}

    etc...

\stoptext

fails.

In addition, I am interested in whether directly in Lua to create a new counter as in the previous.

\starttext
\newcount\mycount
\directlua{
tex.setcount("mycount",125)
}

again works, but anything like:

\starttext
    \directlua{tex.print([[\newcount\myothercount]])}
    \directlua{tex.newcount("myothercount")}
    etc...

\stoptext

again fails...

Is there any source or examples to study anything about it?

Thanx Jaroslav

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : [email protected] / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to