Le 21/05/2013 11:10, Monika a �crit :
> I am submitting a document which is based on the IEEE conference paper class but requires a slightly wider margin for the first page :
> A4 first page Top 25 Left 13.1 Right 13.1 Bottom 19.1 mm
> A4 other pages Top 14.1 Left 13.1 Right 13.1 Bottom 19.1 mm
>
> I am using TexWorks with MikTex, not sre if that's relevant, but basically need to know if it's possible to only change the top margin for the first page (conference paper, so not a title page as such) and if so how I do this? The other pages are fine as they are, and I would prefer not to have them all have wider margins
>
You can change the geometry using \newgeometry.
To do that automatically, you can set a hook when
the first page is printed (\shipout).
Such a hook will work if \textwidth is unchanged
(that is if "left+right" margins is constant, which is
the case in your example) :
\usepackage [showframe]{geometry} displays the margins
for easy checking :
\documentclass [a4paper]{article}
\usepackage [utf8]{inputenc}
\usepackage [T1]{fontenc}
\usepackage [showframe]{geometry}
\usepackage {atbegshi}
\usepackage {lipsum}
\title{The Title}
\author{Me}
\date{etad}
\makeatletter
\gdef\SecondPageGeometry % <defines the hook>
{\ifnum 0=\currentgrouplevel % <only when group level=0>
\global\let\SecondPageGeometry =\relax % <clear the hook>
\expandafter \@gobble % <gobbles \clearpage in \newgeometry>
\newgeometry {top=14.1mm,left=13.1mm,
right= 13.1mm,bottom =19.1mm}%
\else \aftergroup \SecondPageGeometry \fi % <sets the hook again>
}
\AtBeginShipout {\AtBeginShipoutUpperLeft % <sets the hook>
{\SecondPageGeometry }}
\begin{document}
\newgeometry {top=25mm,left=13.1mm, right= 13.1mm,bottom =19.1mm}
\maketitle
\section{First section}
\lipsum[1-40]
\end{document}\endinput