From: Taco Hoekwater <taco@elvenkind.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: page counter problem
Date: Wed, 30 Sep 2020 13:37:18 +0200 [thread overview]
Message-ID: <A1889AB8-AABD-482B-9DB2-AA805F1A9E7A@elvenkind.com> (raw)
In-Reply-To: <CAFMOkGXQsS1jDJcp94ROxjA0LHkzSKNzJvWpidSu91_6mHQRZw@mail.gmail.com>
Hi Alan,
> On 30 Sep 2020, at 12:50, Alan Bowen <bowenalan03@gmail.com> wrote:
>
> he page counter does not increase in the first iteration an PDf inclusion but seems to work properly after that. Have attached a sample file (69K) that will serve to show the problem—at least, on my machine.
It is not the iteration itself. Try with another pdf with more than 2 pages and you
will see that it happens in the first page(s).
The problem is that you are not giving ConTeXt a fair chance to update the page number,
because a series of \vbox to \paperheight {}’s cannot cleanly be broken into separate
pages. The solution is to use
\dorecurse{\noffigurepages}
{\vbox to \paperheight
{\vskip-\dimexpr\headerheight+\headerdistance+\topspace\relax
\hbox to \hsize
{\hskip-\backspace
\layeredtext[]
[boffset=3pc]
{\red\userpagenumber}
{\externalfigure[HannahBW.pdf][page=#1]}%
\hss}%
\vss}\page
}
where the extra \page command allows ConTeXt to properly process the page breaks.
Best wishes,
Taco
___________________________________________________________________________________
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
___________________________________________________________________________________
next prev parent reply other threads:[~2020-09-30 11:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-30 10:50 Alan Bowen
2020-09-30 11:37 ` Taco Hoekwater [this message]
2020-09-30 12:59 ` Alan Bowen
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=A1889AB8-AABD-482B-9DB2-AA805F1A9E7A@elvenkind.com \
--to=taco@elvenkind.com \
--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).