Am 26.11.25 um 09:53 schrieb Hans Hagen via ntg-context:
On 11/25/2025 10:54 PM, Max Chernoff via ntg-context wrote:
\normalexpanded{\noexpand\unit{\the\nodimen #2 \scratchdimen}}
in lmtx you can just use \expanded
Great, another puzzle piece. But it doesn’t stop here:
Can I apply a format code, e.g. for rounding, to use such a dimension
with \unit?
"""
\newdimen\Indent
\Indent=12pt
Indent is \the\Indent\ wide.
That’s \the\nodimen mm\Indent in metric.
Nicely formatted:
\expanded{\unit{\the\nodimen mm \Indent}}.
% I’d like to round/cut this to 2 digits, like
\unit{__,__1.23 mm}
"""
BTW, why does the following work without \the? Is this not a dimension?
"""
\setwidthof{ABCDE}\to\Width
{ABCDE} is \Width\ wide.
"""
Hraban
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : [email protected] /
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________