[Tex/LaTex] Different margins for title page

geometrymarginstitles

My document class is article with a4paper. The margins that I want for the body are:

top: 1 inch
bottom: 1 inch
right: 0.5 inch
left: 1.5 inch

The title page should have a 1 inch margin on all four sides, but the body of my paper should have margins as specified above.

I tried using the geometry package to specify these margins. But it didn't come out as I wanted. How can I achieve this?

Best Answer

Using the geometry package it is possible to switch your layout mid-document using the \newgeometry{<settings>} macro. We first set up the initial layout of the title page (1in on all four sides) when the package is loaded

\usepackage[showframe,paper=a4paper,margin=1in]{geometry}% http://ctan.org/pkg/geometry

and then change this after the title page using

\newgeometry{top=1in,bottom=1in,right=0.5in,left=1.5in}

Here is the complete MWE:

\documentclass{article}
\usepackage[showframe,paper=a4paper,margin=1in]{geometry}% http://ctan.org/pkg/geometry
\usepackage{lipsum}% http://ctan.org/pkg/lipsum
\begin{document}
\begin{titlepage}
\thispagestyle{empty}
\author{Somebody Important}
\title{Something just as important}
\maketitle
\lipsum[1-2]
\end{titlepage}

\newgeometry{top=1in,bottom=1in,right=0.5in,left=1.5in}

\section{First section} \lipsum[1-4]
\section{Second section} \lipsum[5-8]
\section{Third section} \lipsum[9-12]
\section{Last section} \lipsum[13-16]
\end{document}

enter image description here

lipsum provides dummy text, while the showframe option to geometry merely frames the page to highlight the layout of the text block and other areas.