View Issue Details

IDProjectCategoryView StatusLast Update
0000986contextbug reportpublic2016-09-15 18:35
ReporterFloMiLe Assigned ToHans Hagen  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionno change required 
Summary0000986: \widthofstring does not only measure width of output string
DescriptionWhen one uses \widthofstring for an expression that does not only include pure text, the calculated width does not equal the width of the actual output string.

This is shown below for colored text and inline math mode.
Steps To Reproduce\starttext
Width of string: \widthofstring{string}\\
Width of \color[green]{string}: \widthofstring{\color[green]{string}}\\
Width of 3: \widthofstring{3}\\
Width of 3: \widthofstring{$3$}\\
Width of 3: \widthofstring{\m{3}}
\stoptext
TagsNo tags attached.

Activities

Hans Hagen

2016-09-15 18:35

manager   ~0001643

this helper only accepts utf sequences (as the comment in the code indicates):

% this one takes simple (utf) strings

you can use

\setwidthof{...}\to\MyWidth

or just \setbox\scratchbox{...} and then \wd\scratchbox

Issue History

Date Modified Username Field Change
2016-09-15 17:48 FloMiLe New Issue
2016-09-15 18:35 Hans Hagen Note Added: 0001643
2016-09-15 18:35 Hans Hagen Status new => closed
2016-09-15 18:35 Hans Hagen Assigned To => Hans Hagen
2016-09-15 18:35 Hans Hagen Resolution open => no change required