I want to put pagenumber and navigation into a layer, but the counter for pagenumber is not working. Here's a minimal example:

\setupsymbolset[navigation 1]


path p,q ;
p := (0,0) -- (60mm,0) .. (65mm,5mm) .. (60mm,10mm) -- (0,10mm) ;
q := (0,1mm) -- (59mm,1mm) .. (64mm,5mm) .. (59mm,9mm) -- (0,9mm) ;
fill p--cycle withcolor red ;
draw q withcolor white withpen pencircle scaled .5pt dashed evenly ;




\dorecurse{10}{\input knuth \page}

But pagenumber counter is not working: all pages are numbered as 1. Am I doing something wrong? Thank you so much!

  • 1
    Advice for further posts: You should create a minimal example. That means to remove any code that is not directly related to your problem. You could haved removed e.g. the modules, symbols, buttons, interaction and the entire MetaPost code. A simple \pagenumber within a \setlayer already demonstrates the problem. The entire example could have been compressed to six lines. – Marco Sep 7 '12 at 7:27

The problem and the solution is described in ConTeXt wiki - Layers.

The content of layer is fixed after your set it and will appear in the same way on each page. […] To recalculate the content on each new page you have to enclose the \setlayer settings within \startsetups ... \stopsetups

Here is an example:


\startsetups [navegacion]

  [background=navegacion, setups=navegacion]

    {\input knuth \page}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.