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

Aditya Mahajan adityam at umich.edu
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]%
      \incrementnumber[page] %<---- Added
      \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,
Aditya

-- 
Aditya Mahajan, EECS Systems, University of Michigan
http://www.eecs.umich.edu/~adityam || Ph: 7342624008


More information about the ntg-context mailing list