2007/3/14, Robin Kirkham <robin.kirkham@csiro.au>:
Hi all,

Is there a ConTeXt equivalent to LaTeX \settowidth{}, or better still
some macro I can do things like

\setupsomething[
     ...
     width={\widthof{\bf sometext\emspace}},
     ...]

Cheers,

Robin
 
Hi Robin,
 
I don't know if there is something build in but the following definition should
work for simple cases.

\def\widthof#1%
  {\bgroup
   \setbox\scratchbox\hbox{#1}%
   \the\wd\scratchbox%
   \egroup}

\starttext

\getrawparameters
  [robin]
  [width=\widthof{Robin Kirkham}]

\robinwidth

\stoptext

Wolfgang