TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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!

share|improve this question
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
up vote 7 down vote accepted

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}
share|improve this answer
Thank you so much, I don't know how I didn't saw that. – acidrums4 Sep 7 '12 at 13:08

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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