On 13-6-2011 2:34, Wolfgang Schuster wrote:
Am 13.06.2011 um 14:30 schrieb luigi scarso:
How can I do the same thing in ConTeXt? plain TeX is ok, for example, \newdimen\AlphaBet \bgroup \setbox10=\hbox{abcdefghijklmnopqrstuvwxyz} \global\AlphaBet=\wd10\egroup \the\AlphaBet
\starttext
\dowithnextbox {\edef\AlphabetLength{\the\nextboxwd}}% \hbox{abcdefghijklmnopqrstuvwxyz}
\AlphabetLength
\stoptext
Hans wrote also a command for this but it never went into core: http://archive.contextgarden.net/message/20070314.120612.adab0a8b.en.html
Ok, I'll add it. There will also be an expandable variant (proper typeset but the string must be utf characters only) \starttext \setwidthof{Robin Kirkham}\to\whatever \whatever=\widthofstring{Robin Kirkham} \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 -----------------------------------------------------------------