You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If \afterpage is followed by more than a page worth of material before the output routine is called it can lose
the entire page and insert its material before the contributions held over.
But this version is from @u-fischer and works with pdflatex, the problem shows on old releases so doesn't seem related to recent changes for marks or para hooks.
Minimal example showing the bug
\RequirePackage{latexbug}
\documentclass[]{book}%\usepackage{afterpage}
\begin{document}
abc
\vspace{26\baselineskip}
abc
\afterpage{\clearpage Whatever \clearpage}
ups-A where is the rule?\\\rule{4pt}{\textheight}\\ups-B
%\\here is comes
abc
\end{document}
If the galley has more material than a page than the \lastbox will not take out the \null box but something else (in this case the rule. So what you need is something like
\nointerlineskip\null
\output{%
\ifnum\outputpenalty=-100013
\typeout{---> special penalty reached}%
\global\setbox\AP@partial\vbox{%
\unvbox\@cclv
\global\setbox\@ne\lastbox}%
\global\setbox\AP@footins\box\footins
\else
\typeout{---> special penalty NOT reached}%
\the\AP@output
\fi
}%
\penalty-100013
We don't have a registry for special penaltiers but I think 100013 is ok,
Brief outline of the bug
If
\afterpage
is followed by more than a page worth of material before the output routine is called it can losethe entire page and insert its material before the contributions held over.
Originally reported at
https://tex.stackexchange.com/questions/738483/afterpage-command-making-a-full-page-disappear
But this version is from @u-fischer and works with pdflatex, the problem shows on old releases so doesn't seem related to recent changes for marks or para hooks.
Minimal example showing the bug
Log file (required) and possibly PDF file
afterpage-x.log
The text was updated successfully, but these errors were encountered: