* [NTG-context] what are the interaction between \showframe and \realpageno in \startuseMPgraphic ?
@ 2024-04-20 21:00 garulfo
2024-04-24 20:21 ` [NTG-context] " Wolfgang Schuster
0 siblings, 1 reply; 2+ messages in thread
From: garulfo @ 2024-04-20 21:00 UTC (permalink / raw)
To: ntg-context
I can not figure out why this progress bar only works when \showframe is activated.
When you comment on \showframe, it's as if \realpageno is at zero.
(current version: 2024.04.01 08:59)
\showframe
\startuseMPgraphic{MonGraphisme_MP}
numeric n ; n := \number\realpageno ;
numeric m ; m := \number\lastpageno ;
numeric h ; h := \overlayheight ;
numeric w ; w := \overlaywidth ;
numeric e ; e := 3mm;
numeric r ; r := (((n-1)/(m-1))*w);
fill fullsquare xscaled w yscaled e shifted (w/2, h/2) withcolor darkblue ;
fill fullsquare xscaled r yscaled e shifted (r/2, h/2) withcolor darkred;
\stopuseMPgraphic
\defineoverlay [MonGraphisme_OL] [\useMPgraphic{MonGraphisme_MP}]
\setupbackgrounds [footer] [rightmargin] [background={MonGraphisme_OL}]
\starttext
\dorecurse{10}{\input tufte\page}
\stoptext
Any clue is warmly welcome
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 2+ messages in thread
* [NTG-context] Re: what are the interaction between \showframe and \realpageno in \startuseMPgraphic ?
2024-04-20 21:00 [NTG-context] what are the interaction between \showframe and \realpageno in \startuseMPgraphic ? garulfo
@ 2024-04-24 20:21 ` Wolfgang Schuster
0 siblings, 0 replies; 2+ messages in thread
From: Wolfgang Schuster @ 2024-04-24 20:21 UTC (permalink / raw)
To: mailing list for ConTeXt users, garulfo
garulfo@azules.eu schrieb am 20.04.2024 um 23:00:
> I can not figure out why this progress bar only works when \showframe is activated.
> When you comment on \showframe, it's as if \realpageno is at zero.
> (current version: 2024.04.01 08:59)
>
> \showframe
>
> \startuseMPgraphic{MonGraphisme_MP}
> numeric n ; n := \number\realpageno ;
> numeric m ; m := \number\lastpageno ;
> numeric h ; h := \overlayheight ;
> numeric w ; w := \overlaywidth ;
> numeric e ; e := 3mm;
> numeric r ; r := (((n-1)/(m-1))*w);
> fill fullsquare xscaled w yscaled e shifted (w/2, h/2) withcolor darkblue ;
> fill fullsquare xscaled r yscaled e shifted (r/2, h/2) withcolor darkred;
> \stopuseMPgraphic
>
> \defineoverlay [MonGraphisme_OL] [\useMPgraphic{MonGraphisme_MP}]
>
> \setupbackgrounds [footer] [rightmargin] [background={MonGraphisme_OL}]
>
> \starttext
> \dorecurse{10}{\input tufte\page}
> \stoptext
>
> Any clue is warmly welcome
You need
\setupbackgrounds[state=repeat]
which is set when you use \showframe.
Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-04-24 20:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-20 21:00 [NTG-context] what are the interaction between \showframe and \realpageno in \startuseMPgraphic ? garulfo
2024-04-24 20:21 ` [NTG-context] " Wolfgang Schuster
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).