If you can afford to make your code depend on a version of geometry
that is not yet included in Debian, Ubuntu nor in Fedora, you can use the following code to replace the one in the question. It is much shorter to be sure.
\documentclass{article}
\usepackage[english]{babel}
\usepackage{blindtext}
\usepackage{geometry}[2010/09/12]
\begin{document}
\blindtext[5]
\newgeometry{textheight=\paperheight,textwidth=\paperwidth}
% do absolute placement stuff where textpos doesn't work:
\noindent\rule{5mm}{5mm}
\restoregeometry
\blindtext[10]
\end{document}
I couldn't make out which trick geometry
uses though. The last thing \restoregeometry
does is to invoke \Gm@changelayout
which just sets some lengths, some standard, some internal to geometry
. Not even so much as a \clearpage
.
So an answer that actually explains why the code in the question behaves so strangely would still be much appreciated and accepted as correct answer.
If you're happy just truncating the bottom of the content, then you can force into a minipage:
\documentclass{article}
\usepackage{lipsum}
\begin{document}
\begin{minipage}[t][0pt]{\linewidth}
\lipsum[1-100]
\end{minipage}
\end{document}
But notice how I set the height of the minipage
to zero. This makes it stay on page one.
Is your company really going to be impressed with LaTeX if you truncate things?
Provided that you know your newsletter is never going to be longer than 2-3 pages. There is probably a way you work around this. I'm thinking that you don't set the height of the minipage, save its height to a minipage, the run latex again reading in the value of the minipage's height and set the height of the document's page to the same value. I'm not sure I know how to do such an elaborate work-around, but I'm sure if you post a question
How do I define the dimensions of a page to accommodate its contents: even if unusually large?
someone will come up with an interesting solution.
Of course, such a solution only makes sense if the newsletter is something only posted electronically and not printed.
OR
If you know the contents are only be slightly larger than the page, you can use graphicx
package and rescale the box so it does in fact fit on the page.
For example:
\documentclass{article}
\usepackage{graphicx}
\usepackage{calc}
%% for demo purposes only
\usepackage{showframe}
\usepackage{lipsum}
\begin{document}
\noindent\scalebox{.94}{%
\begin{minipage}[t]{1.06\linewidth}
\lipsum[1-6]
\end{minipage}}
\end{document}
This is a document for which \enlargethispage
wouldn't suffice. But by selecting appropriate values for the scale factor and the \linewidth
(I chose near reciprocals), you can get something fairly decent looking.
Best Answer
Use
\enlargethispage
or\enlargethispage*
According to the documentation,