![](https://secure.gravatar.com/avatar/be49110e195f5eac47c04570251121c1.jpg?s=120&d=mm&r=g)
Using the following: \margindata{some macro expansions} I know that \margindata is typeset at a later moment than its place in the code suggests. The problem is that macro expansions inside the {}'s are expanded twice. This interferes badly with the things I want to happen. Tracing what happens, I conclude that the result of the first expansion is lost and is not carried into the actual placement of the marginnote. The question this is: how to solve this problem? dr. Hans van der Meer
![](https://secure.gravatar.com/avatar/74d41c3215dcdd377343cdc47311757c.jpg?s=120&d=mm&r=g)
Hans van der Meer schrieb am 15.07.2020 um 21:48:
Using the following:
\margindata{some macro expansions}
You're missing the first mandatory argument, e.g. \margindata[inright]{...}.
I know that \margindata is typeset at a later moment than its place in the code suggests. The problem is that macro expansions inside the {}'s are expanded twice. This interferes badly with the things I want to happen.
No, the content is stored in a box and placed later. \definecounter[test] \starttext \dorecurse{10} {\inleft{\incrementedcounter[test]}Line \recurselevel\par} \stoptext
Tracing what happens, I conclude that the result of the first expansion is lost and is not carried into the actual placement of the marginnote.
The question this is: how to solve this problem?
Provide a working minimal example. Wolfgang
![](https://secure.gravatar.com/avatar/be49110e195f5eac47c04570251121c1.jpg?s=120&d=mm&r=g)
I didn't miss that argument, of course, my actual code was: \margindata[outer][hoffset=\marginoffset] dr. Hans van der Meer
On 15 Jul 2020, at 22:10, Wolfgang Schuster
wrote: Hans van der Meer schrieb am 15.07.2020 um 21:48:
Using the following: \margindata{some macro expansions}
You're missing the first mandatory argument, e.g. \margindata[inright]{...}.
I know that \margindata is typeset at a later moment than its place in the code suggests. The problem is that macro expansions inside the {}'s are expanded twice. This interferes badly with the things I want to happen.
No, the content is stored in a box and placed later.
\definecounter[test]
\starttext
\dorecurse{10} {\inleft{\incrementedcounter[test]}Line \recurselevel\par}
\stoptext
Tracing what happens, I conclude that the result of the first expansion is lost and is not carried into the actual placement of the marginnote. The question this is: how to solve this problem?
Provide a working minimal example.
Wolfgang ___________________________________________________________________________________ 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 van der Meer
-
Wolfgang Schuster