I want to repeat certain code block on every page on top starting from second page. This is assuming that header is defined. There is a package that can detect the number of page?
Thanks
Use two pagestyles called, for example first and main. Then in your document do something along the lines:
\documentclass...
% define the first and main pagestyles, or use existing ones
% ...
\pagestyle{main}
\begin{document}
% some text (which might set its own page style)
\thispagestyle{first} % for the first page
% more text on the first page then \pagestyle{main} comes into effect on the following pages
fancyhdr pagestyles?
– benjujo
Dec 02 '19 at 20:58
fancyhdr lets you define as many pagestyles as you want. Please read the manual (> texdoc fancyhdr). It is up to you not to overwrite any predefined styles.
– Peter Wilson
Dec 03 '19 at 18:45
\labels, or tapping into the shipout routine (through page styles or otherwise). Can you be a bit more specific about your needs? – Werner Dec 02 '19 at 17:58