[NTG-context] page counter problem
Alan Bowen
bowenalan03 at gmail.com
Wed Sep 30 14:59:01 CEST 2020
Thank you, Taco, for the fix *and* the helpful explanation.
The file now works (and I can now put this project to bed!)
Alan
On Wed, Sep 30, 2020 at 7:38 AM Taco Hoekwater <taco at elvenkind.com> wrote:
> Hi Alan,
>
> > On 30 Sep 2020, at 12:50, Alan Bowen <bowenalan03 at 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 at 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 part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20200930/c1bb71fc/attachment-0001.htm>
More information about the ntg-context
mailing list