In this example
\documentclass{article}
\usepackage[a6paper,landscape,margin=1cm,bottom=2cm]{geometry}
\usepackage[english]{babel}
\usepackage{blindtext}
\usepackage{afterpage,refcount,lastpage}
\newcommand{\testafterpage}{%
\noindent{\Large\ttfamily NEW PAGE!\quad}%
\afterpage{\testafterpage}%
}
\AtBeginDocument{\testafterpage}
\begin{document}
\blindtext[3]
\end{document}
the words NEW PAGE!
should be printed at the beginning of every page using the afterpage
package. For some reason, NEW PAGE!
is not inserted at the second page of the document:
Is this intended behaviour? Is it possible to fix this in general?
I am aware of the various packages like atbegshi
that allow to add some content when the page is shipped out, but I don't know if this can also be used as a replacement for the strange behaviour of afterpage
.
NEW PAGE!
at the top op pages 1, 3 & 4.\end{document}
. The problem is that only paragraph endings trigger the page builder.lipsum
more often and it inserts\par
by default.\par
doesn't help if I use, say,\blindtext[5]
since there is no paragraph ending for more than one page of the output. After LaTeX called\shipout
, there should be a list of the remaining content to be typeset on subsequent pages. Is there any possibility to modify this content or at least prepending something to it?