I'm trying to change the layout of the last page in a document.
For this I'm using the lastpage, the geometry and the xifthem package.
Code: Select all
\ifthenelse{\thepage=\pageref{LastPage}}{
%Adding new geometry
\newgeometry{bottom=12.5cm}
}{}
The problem is: this inserts another a second page which is not what I want.
I want this:
- If there is just one page => Bottom margin should be 12.5cm
- If there are multiple pages => Bottom margin should be Xcm except for the last page. There it should be 12.5cm
Full, misbehaving example:
Code: Select all
\documentclass{scrartcl}
\usepackage{lipsum}
\usepackage{lastpage}
\usepackage{xifthen}
\usepackage[a4paper]{geometry}
\begin{document}
\ifthenelse{\thepage=\pageref{LastPage}}{
\newgeometry{bottom=12.5cm}
}{}
\lipsum
\end{document}
Regards, Florian