ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* how to with \margindata
@ 2020-07-15 19:48 Hans van der Meer
  2020-07-15 20:10 ` Wolfgang Schuster
  0 siblings, 1 reply; 3+ messages in thread
From: Hans van der Meer @ 2020-07-15 19:48 UTC (permalink / raw)
  To: NTG ConTeXt


[-- Attachment #1.1: Type: text/plain, Size: 510 bytes --]

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



[-- Attachment #1.2: Type: text/html, Size: 1844 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

* Re: how to with \margindata
  2020-07-15 19:48 how to with \margindata Hans van der Meer
@ 2020-07-15 20:10 ` Wolfgang Schuster
  2020-07-15 20:30   ` Hans van der Meer
  0 siblings, 1 reply; 3+ messages in thread
From: Wolfgang Schuster @ 2020-07-15 20:10 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: how to with \margindata
  2020-07-15 20:10 ` Wolfgang Schuster
@ 2020-07-15 20:30   ` Hans van der Meer
  0 siblings, 0 replies; 3+ messages in thread
From: Hans van der Meer @ 2020-07-15 20:30 UTC (permalink / raw)
  To: NTG ConTeXt


[-- Attachment #1.1: Type: text/plain, Size: 1645 bytes --]

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
> ___________________________________________________________________________________


[-- Attachment #1.2: Type: text/html, Size: 3868 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:[~2020-07-15 20:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-15 19:48 how to with \margindata Hans van der Meer
2020-07-15 20:10 ` Wolfgang Schuster
2020-07-15 20:30   ` Hans van der Meer

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).