Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

afterpage: Information lost if page where afterpage is to place code is thrown away. #1665

Open
jasperhabicht opened this issue Feb 19, 2025 · 0 comments

Comments

@jasperhabicht
Copy link

Brief outline of the bug

When using the afterpage package, information is lost when e.g. placing properties in \AtEndDocument (or \AddToHook{enddocument/afterlastpage}) if the page on which afterpage is to insert code remains blank and thus is thrown away.

Minimal example showing the bug

\RequirePackage{latexbug}
\documentclass{article}
\usepackage{lipsum, afterpage}

\ExplSyntaxOn
\property_new:nnnn { foo } { now } { 0 } { foo }

\AtEndDocument{
    \property_record:nn { myproperty } { foo }
}
\ExplSyntaxOff
    
\begin{document}
\afterpage{\enlargethispage{-20mm}}

\lipsum[1]

\ExplSyntaxOn    
\property_ref:nn { myproperty } { foo }
\ExplSyntaxOff

\end{document}

The output shows 0 instead of foo and the .aux file does not contain the property.

Log file (required) and possibly PDF file

afterpage-bug.pdf
afterpage-bug.log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants