Is there any way I can execute a command (\ifthenelse
actually) at the start of every page?
I tried \AtBeginShipout
(atbegshi) but that seem to get executed when the page is about to be rendered (shipped out). I want something different, as soon as the page is about to start.