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 <wolfgang.schuster.lists@gmail.com> 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
___________________________________________________________________________________