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