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 addition, I solve the problem at LuaTEX, so ConTeXt converting
functions do not work etc. ..
Thanx Jaroslav
Here is another example:
\starttext
\newdimen\mytexdimension
\mytexdimension=100pt
\ctxlua{myluadimension = number.topoints(10000)}
\ctxlua{context(myluadimension)}
\the\mytexdimension
\hbox to\mytexdimension{XXXXX}YYYY
% FAILS
%\the\myluadimension
%\hbox to\myluadimension{XXXXX}YYYY
Of course that fails: why should the globally defined
lua variable "myluadimension" magically become a \dimen
register at the tex end? And believe it or not, the context
conversion function do work, else mkiv wouldn't work.
\stoptext
Here is the right code:
\starttext
\newdimen\mytexdimension \mytexdimension 100pt
\ruledhbox to\mytexdimension{\the\mytexdimension}
\ctxlua{document.myluadimension = "200pt"}
\ruledhbox to
\cldcontext{document.myluadimension}{\cldcontext{document.myluadimension}}
\ctxlua{tex.dimen.mytexdimension = "300pt"}
\ruledhbox to\mytexdimension{\the\mytexdimension}
\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
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : ntg-context@ntg.nl / 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
___________________________________________________________________________________