[NTG-context] variable edef with localhsize calculation

Rörig, Julian J.Roerig at salt-and-pepper.eu
Thu Apr 4 15:05:22 CEST 2019


Dear All,


I try to save \localhsize in a variable (with \edef), but whenever the enclosure changes, my variable changes too.


\starttext
\edef\myVar{\dimexpr (\localhsize-15pt)\relax}

localhsize: \the\dimexpr\localhsize\relax \\
myVar: \the\dimexpr\myVar\relax \\

\setupnarrower[middle=50mm]
\startnarrower
localhsize: \the\dimexpr\localhsize\relax \\
myVar: \the\dimexpr\myVar\relax \\
\stopnarrower
\stoptext



I would expect that myVar has the same value inside the narrower as outside, because I used \edef and not \def.

Is there another variable I can use, or does someone knows a solution for this specific problem?
Thanks, Julian



btw. everything works as expected, if I do not use \localhsize.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20190404/f6c4b664/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: localhsize.png
Type: image/png
Size: 7830 bytes
Desc: localhsize.png
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20190404/f6c4b664/attachment.png>


More information about the ntg-context mailing list