* variable edef with localhsize calculation
@ 2019-04-04 13:05 Rörig, Julian
2019-04-04 13:46 ` Hans Hagen
0 siblings, 1 reply; 3+ messages in thread
From: Rörig, Julian @ 2019-04-04 13:05 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 740 bytes --]
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.
[-- Attachment #1.2: Type: text/html, Size: 2216 bytes --]
[-- Attachment #2: localhsize.png --]
[-- Type: image/png, Size: 7830 bytes --]
[-- Attachment #3: Type: text/plain, Size: 493 bytes --]
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: variable edef with localhsize calculation
2019-04-04 13:05 variable edef with localhsize calculation Rörig, Julian
@ 2019-04-04 13:46 ` Hans Hagen
2019-04-11 9:12 ` Rörig, Julian
0 siblings, 1 reply; 3+ messages in thread
From: Hans Hagen @ 2019-04-04 13:46 UTC (permalink / raw)
To: mailing list for ConTeXt users
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
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: variable edef with localhsize calculation
2019-04-04 13:46 ` Hans Hagen
@ 2019-04-11 9:12 ` Rörig, Julian
0 siblings, 0 replies; 3+ messages in thread
From: Rörig, Julian @ 2019-04-11 9:12 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 1356 bytes --]
thanks, that helped me a lot
________________________________
Von: ntg-context <ntg-context-bounces@ntg.nl> im Auftrag von Hans Hagen <j.hagen@xs4all.nl>
Gesendet: Donnerstag, 4. April 2019 15:46:28
An: mailing list for ConTeXt users
Betreff: Re: [NTG-context] variable edef with localhsize calculation
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<http://www.pragma-ade.nl> | www.pragma-pod.nl<http://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
___________________________________________________________________________________
[-- Attachment #1.2: Type: text/html, Size: 2998 bytes --]
[-- Attachment #2: Type: text/plain, Size: 493 bytes --]
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-04-11 9:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-04 13:05 variable edef with localhsize calculation Rörig, Julian
2019-04-04 13:46 ` Hans Hagen
2019-04-11 9:12 ` Rörig, Julian
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).