![](https://secure.gravatar.com/avatar/e07e15a8be3c4c1723f5a0397bc17424.jpg?s=120&d=mm&r=g)
On 5/22/2020 19:49, Rik Kabel wrote:
If the OP simply wants the width of a string, one can use \setwidthof#1\to#2.
\define\String{pqrs} \setwidthof{\String}\to\Wdth \String\ is \Wdth\ wide.
\setwidthof{{\tfb\em\String}}\to\Wdth {\tfb\em\String} is \Wdth\ wide.
I do not know if that is different from the width of the same string unboxed from the paragraph. There may be some adjustments made in justification, expansion, and such that are not treated.
Correcting my post (thank you, Floris), the format is a bit different than I had written. The following works: \starttext \define\String{pqrs} \setwidthof\String\to\WdthA {\String} is \WdthA\ wide. \define\String{\tfx\em pqrs} \setwidthof\String\to\WdthB {\String} is \WdthB\ wide. \define\String{\ss pqrs} \setwidthof\String\to\WdthC {\String} is \WdthC\ wide. \stoptext Giving: -- Rik