# Different margins within one document

having the following code, how is it possible to insert another page, which would have different margin paramaters as opposed to those seen in the code? Basically, the first page is cover page with different margins (top=20, bottom=20, right=20, left=20) and this is the one I would like to integrate into this code. Thanks!

\documentclass[12pt,oneside,a4paper]{article}

\usepackage[
left=40mm,
top=30mm,
right=20mm,
bottom=20mm,
headheight=14.5pt, %%% 3mm is too small
heightrounded
]{geometry}

\usepackage{fancyhdr,xpatch}

\pagestyle{fancy}
\fancyhf{}

\makeatletter
\let\ORI@section\section
\renewcommand{\section}{\@ifstar\s@section\ORI@section}
\newcommand{\s@section}[1]{%
\ORI@section*{#1}
\csname phantomsection\endcsname % for hyperref
}
\xpatchcmd{\tableofcontents}{\section}{\ORI@section}{}{} % toc not in toc
\makeatother

\begin{document}
\pagenumbering{roman}

\tableofcontents
\clearpage

\listoffigures
\clearpage

\listoftables
\clearpage

\section*{Section A}

\clearpage
\pagenumbering{arabic}

\section{Section B}

\end{document}

-
The \newgeometry command from the geometry package takes mostly the same options as \usepackage[...]{geometry} and does what you want. See the package documentation for more details. –  ChrisS Sep 2 '13 at 11:06
thanks, are there are any other alternatives? –  ajafarov Sep 2 '13 at 11:19
There are other alternatives, but it is not clear why you would want to use them given you are already using the geometry package. –  StrongBad Dec 10 '13 at 16:22

Using the \newgeometry macro is the way to go here. Changing the page is as simple as adding to you MWE

\newgeometry{top=20mm, bottom=20mm, right=20mm, left=20mm}
A Title Page
\restoregeometry%
\clearpage


This gives a new complete MWE of

\documentclass[12pt,oneside,a4paper]{article}

\usepackage[
left=40mm,
top=30mm,
right=20mm,
bottom=20mm,
headheight=14.5pt, %%% 3mm is too small
heightrounded
]{geometry}

\usepackage{fancyhdr,xpatch}

\pagestyle{fancy}
\fancyhf{}

\makeatletter
\let\ORI@section\section
\renewcommand{\section}{\@ifstar\s@section\ORI@section}
\newcommand{\s@section}[1]{%
\ORI@section*{#1}
\csname phantomsection\endcsname % for hyperref
}
\xpatchcmd{\tableofcontents}{\section}{\ORI@section}{}{} % toc not in toc
\makeatother

\begin{document}
\newgeometry{top=20mm, bottom=20mm, right=20mm, left=20mm}
A Title Page
\restoregeometry%
\clearpage

\pagenumbering{roman}

\tableofcontents
\clearpage

\listoffigures
\clearpage

\listoftables
\clearpage

\section*{Section A}

\clearpage
\pagenumbering{arabic}

\section{Section B}

\end{document}

-