variable edef with localhsize calculation
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.
On 4/4/2019 3:05 PM, Rörig, Julian wrote:
\edef\myVar{\dimexpr (\localhsize-15pt)\relax}
\edef\myVar{\the\dimexpr\localhsize-15pt\relax} ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
thanks, that helped me a lot
________________________________
Von: ntg-context
\edef\myVar{\dimexpr (\localhsize-15pt)\relax}
\edef\myVar{\the\dimexpr\localhsize-15pt\relax} ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nlhttp://www.pragma-ade.nl | www.pragma-pod.nlhttp://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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___________________________________________________________________________________
participants (2)
-
Hans Hagen
-
Rörig, Julian