# [NTG-context] \pagefigure does not increment page number

Wed May 24 21:16:16 CEST 2006

On Tue, 23 May 2006, Berend de Boer wrote:
> Hello All (probably Hans :-) ),
>
> \pagefigure does increment the page number. It doesn't place a page
> number, I can understand that. But why does it not increment the page
> number? Is that by design?
>
> I'm using the context release of 27 April 2006. Or should I upgrade?

I do not know anything about pagefigure. However, looking at its code
the following should increment pagenumbers.

\unprotect
\def\startnumpagefigure
{\dodoubleempty\dostartnumpagefigure}

\def\dostartnumpagefigure[#1][#2]%
{\bgroup
\getparameters[\??ex][\c!offset=\v!overlay,#2]%
\startTEXpage[\c!offset=\@@exoffset]%
\externalfigure[#1][#2]\ignorespaces} % so we can put some text
below the graphic

\def\stopnumpagefigure
{\stopTEXpage
\egroup}

\def\numpagefigure
{\dodoubleempty\donumpagefigure}

\def\donumpagefigure[#1][#2]%
{\dostartnumpagefigure[#1][#2]\stopnumpagefigure}

\protect

\starttext
\input knuth
\input knuth
\input knuth
\startnumpagefigure[dummy][offset=1cm]
\blank
This is a dummy figure
\stopnumpagefigure
\input knuth
\stoptext

HTH,