Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
\documentclass{article}
\usepackage{scrlayer-scrpage}
\BeforeClosingMainAux{%
\addtocounter{page}{-1}%
\label{LastPage}}
\AtBeginDocument{\begingroup}
\AtEndDocument{\endgroup}
\usepackage{blindtext}
\begin{document}
\pageref{LastPage}
\blindtext
\end{document}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment