what are the interaction between \showframe and \realpageno in \startuseMPgraphic ?
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
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
participants (2)
-
garulfo@azules.eu
-
Wolfgang Schuster