I’m trying to find a way of being able to modify all of the margins of a page whenever I want to and as many times as I want to on a single page in order to be able to put text very easily where I want on a page.
I have thought of using the geometry package and using
\newgeometry{left=6.75cm, right=1cm, top=1cm, bottom=1cm}
%…
\restoregeometry
but unfortunately this only works for whole pages, so I can only change the margins once per page (and then they are valid for the whole page without having the possibility of changing them again).
I found the following script on the internet which enables users to change margins on the fly, just as I want to. The code below works fine and enables me to change the left and right margins of my page as many times as I want to, but unfortunately, it doesn’t give me the option of changing the top and bottom margins.
% placed before \begin{document}
\newenvironment{changemargin}[2]{%
\begin{list}{}{%
\setlength{\leftmargin}{#1}%
\setlength{\rightmargin}{#2}%
}%
\item[]}
{\end{list}}
% And then inside the document, whenever I want to use
% the command to change the margins on the current page
\begin{changemargin}{1.9875cm}{-3.7625cm}
% this means the left margin increases by 1.9875cm compared
% to the default left margin (4.7625cm) (so left margin=6.75cm here)
% and the right margin decreases by 3.7625cm (so right margin=1cm)
% ... (text or pictures in new environment)
\end{changemargin}
For this reason, I tried to adapt the code above and came up with the code below:
% placed before \begin{document}
\newenvironment{changemargin}[3]{%
\begin{list}{}{%
\setlength{\leftmargin}{#1}%
\setlength{\rightmargin}{#2}%
\setlength{\topmargin}{#3}%
}%
\item[]}
{\end{list}}
% And then to use the command:
\begin{changemargin}{1.9875cm}{-3.7625cm}{1cm}
% ...
\end{changemargin}
It compiles and still changes the left and right margins but the top margin remains unchanged. (I haven’t yet tried to change the bottom margin).
Can anyone help me get this code to work completely, and enable me to modify the left, right, top and bottom margins of a page? Thanks.

textposcan satisfy your needs. The command\enlargethispage{<a dimension>}enlarge the page with a given number or lines, points, centimetres etc. – Sveinung Aug 26 '12 at 13:46minipage? – Sigur Aug 26 '12 at 14:17