Hello,
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.
Page Layout ⇒ Controlling the Formatting of the last Page
NEW: TikZ book now 40% off at Amazon.com for a short time.

Controlling the Formatting of the last Page
Create a separate .tex file, let's call it last.tex, in which the formatting of the final page is done. Then, in you main document use the \AtEndDocument{} macro, e.g.:
Code: Select all
Code, edit and compile here:
\documentclass{article}\AtEndDocument{\include{last}}\begin{document}First page\end{document}
howtoTeX.com - Your LaTeX resource site (Tips, Tricks, Templates and more!)
Follow howtoTeX on twitter
Follow howtoTeX on twitter
Controlling the Formatting of the last Page
Hey Frits,
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:
Ideally, the code would build the document with a different set of margins for the last page and a different background image.
Any thoughts on why this isn't working?
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
Code, edit and compile here:
\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?