ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: garulfo@azules.eu
To: ntg-context@ntg.nl
Subject: [NTG-context] what are the interaction between \showframe and \realpageno in \startuseMPgraphic ?
Date: Sat, 20 Apr 2024 21:00:23 -0000	[thread overview]
Message-ID: <171364682343.3369327.1873544910057332570@cgl.ntg.nl> (raw)

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
___________________________________________________________________________________

             reply	other threads:[~2024-04-20 21:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-20 21:00 garulfo [this message]
2024-04-24 20:21 ` [NTG-context] " Wolfgang Schuster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=171364682343.3369327.1873544910057332570@cgl.ntg.nl \
    --to=garulfo@azules.eu \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).