On 27-10-2011 12:32, Thomas A. Schmitz wrote:
On 10/27/2011 11:53 AM, Wolfgang Schuster wrote:
With “tex.dimen[…]” you get the value in scaled points but
util-dim.lua provides some functions to convert the value in points,
centimeter etc.

\starttext
\startluacode
context.blackrule{ width = number.topoints(tex.dimen["textwidth"]/2) }
\stopluacode
\stoptext

Thank you Wolfgang, that's exactly what I was looking for!

or just tex.dimen["textwidth"]/2 .. "sp"


-----------------------------------------------------------------
                                          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
___________________________________________________________________________________

Reply via email to