Page Layout ⇒ Controlling the Formatting of the last Page
Controlling the Formatting of the last Page
I have searched the forums for an answer to my problem, and I haven't come across a solution as of yet, so I apologize in advance if this matter has been resolved.
I am wanting to control the formatting of the last page of a document whose number of pages will be unknown. In particular, I want to change the margins and background image of the final page. Both I know how to control when being applied to the entire document, but I want to be able to redefine each.
Is there a way to do this? Any help anyone can offer is appreciated.
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
Controlling the Formatting of the last Page
Code: Select all
\documentclass{article}
\AtEndDocument{\include{last}}
\begin{document}
First page
\end{document}
Follow howtoTeX on twitter
Controlling the Formatting of the last Page
Thanks for the response. I've tried what you've suggested, but it doesn't seem to be working. Using the concept of the \AtEndDocument command, here is the basic idea of what I'm trying to accomplish:
Code: Select all
\documentclass{article}
\usepackage{wallpaper}
\usepackage{geometry}
\AtEndDocument{
\ClearWallPaper\CenterWallPaper{1}{Last_Page_Background_Image}\newgeometry{Final_Page_Margins}
}
\begin{document}
\newgeometry{Initial margins}
\CenterWallPaper{1}{Background_Image}
Code...
\end{document}
Any thoughts on why this isn't working?