# How to change page margins but keep the placement of the pagemark?

I use the package geometry to adjust the page margins for my needs. However, the first page should be different. To accomplish this, I used \newgeometry, \restoregeometry which works fine, except that the distance between page number and margins is also changed (of course). How can I adjust the margins on the first page differently from the rest, but have the exact same placement of the page number (so the page mark on page 1 should be placed like the one on page 3)?

\documentclass[paper=8.5in:11in,twoside]{scrartcl}

\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[american]{babel}
\usepackage[nouppercase]{scrpage2}
\usepackage[bottom=1.1in, left=2in, top=0.6in, right=0.9in]{geometry}

\begin{document}
\newgeometry{bottom=1.1in, left=0.8in, top=0.6in, right=0.6in}% change default geometry settings
Dummy text\dots
\restoregeometry% restore geometry settings
\clearpage
More dummy text\dots
\clearpage
More dummy text\dots
\end{document}


Note that the solution suggested by A.Ellett works for this example. However, I have more things in the footer than just the pagenumber. Here is an example (which I should have provided in the first place). My goal in this example was to move the page number in the margins, but have the rest of the footer aligned with the text. I would like to keep this exactly as on the other pages (page 3), but just change the margins for the rest of the content on the first page.

\documentclass[paper=8.5in:11in,twoside]{scrartcl}

\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[american]{babel}
\usepackage[nouppercase]{scrpage2}
\usepackage[bottom=1.1in, left=2in, top=0.6in, right=0.9in]{geometry}

\rofoot{\texttt{tex.stackexchange.com}\ \ \textbullet\ \ This is just an
example\xpageno{o}}
% the following definition is from http://tex.stackexchange.com/questions/84404/page-number-in-outer-margin-affects-vertical-ruler
\def\xpageno#1{\leavevmode
\vbox to 0pt{
\vss
\hbox to 0pt{%
\if#1o\kern 2em\else\hss\fi\thepage
\if#1o\hss\else\kern2em\fi}}}

\begin{document}
\newgeometry{bottom=1.1in, left=0.8in, top=0.6in, right=0.6in}% change default geometry settings
Dummy text\dots
\restoregeometry% restore geometry settings
\clearpage
More dummy text\dots
\clearpage
More dummy text\dots
\end{document}


Okay, I realized I should have put a not-so-minimal example up in the first place. Here it is:

\documentclass[paper=8.5in:11in,twoside]{scrartcl}

\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[american]{babel}
\usepackage{blindtext}
\usepackage[nouppercase]{scrpage2}
\usepackage[bottom=1.1in, left=2in, top=0.6in, right=0.9in]{geometry}

\rofoot{\texttt{tex.stackexchange.com}\ \ \textbullet\ \ This is just an
example\xpageno{o}}% right odd
\lefoot{\xpageno{e}Just another text}% left even
% the following definition is from http://tex.stackexchange.com/questions/84404/page-number-in-outer-margin-affects-vertical-ruler
\def\xpageno#1{\leavevmode
\vbox to 0pt{
\vss
\hbox to 0pt{%
\if#1o\kern 2em\else\hss\fi\thepage
\if#1o\hss\else\kern2em\fi}}}
\usepackage{changepage}

\begin{document}
% create "title page" but with same footer as other pages
%\newgeometry{bottom=1.1in, left=0.8in, top=0.6in, right=0.6in}% change default geometry settings
% content of the "title page"
\vspace*{74pt}
\noindent
\begin{minipage}[t]{0.3\textwidth}
\vspace{-\baselineskip}
\framebox[\textwidth]{\rule{0pt}{\textwidth}Logo}%
\end{minipage}
\hfill
\begin{minipage}[t]{0.618034\textwidth}
\vspace{-\baselineskip}
{\bfseries\LARGE This is just a title to see what's it all about\par}
\bigskip\bigskip
{\large\bfseries M.\ Mustermann\par}
\medskip
{\footnotesize Fool's Street 42\par}
\bigskip\smallskip
{\large\bfseries M.\ Musterfrau\par}
\medskip
{\footnotesize Fool's University, Fool's City\par}
\end{minipage}
% left/right content
\par\vspace*{248pt}
\begin{minipage}[t]{0.3\textwidth}
\vspace{-\baselineskip}
\footnotesize\noindent
\blindtext[1]
\end{minipage}
\hfill
\begin{minipage}[t]{0.618034\textwidth}
\vspace{-\baselineskip}
\noindent{\bfseries Keywords\par}
{\footnotesize\medskip
Fool's Garden, Fool's proof.
\par\bigskip}
\noindent{\bfseries Abstract\par}
{\footnotesize\medskip\blindtext[1]}
\end{minipage}
%\restoregeometry% restore geometry settings
\clearpage
% first page
\blindtext[6]
\clearpage
% second page
\blindtext[6]
\end{document}


If you use the \newgeometry--\restoregeometry approach, you see how the content of the first page should appear. However, as you can see, the margin for the footer is not identical to the one on, say, page 3. Now, if you use the changepage approach (as given here), you see that the whole page setup seems to get messed up. Also, a new page appears, so the "title page" is not the first one anymore.

-

I think that the easiest solution would be to use changepage package to change the dimensions of the text block, and not of the whole page.

I noticed that your "special settings" for the first page only affect to left and right margins, and not to the top and bottom ones. In particular, you need to extend 1.2in the left margin and 0.3in the right one. This can be achieved with \begin{adjustwidth}{-1.2in}{-0.3in}.

EDIT however, adjustwidth does not update the value of \textwidth, so if you depend on it inside the adjusted environment, you have to update your self "by hand". In this case, the total amount in which the width was increased was 1.5in, so you can put \addtolength{\textwidth}{1.5in} right after the \begin{adjustwidth}.

In a minimal example it would be:

\documentclass[paper=8.5in:11in,twoside]{scrartcl}
\usepackage{changepage}              % <----
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[american]{babel}
\usepackage[nouppercase]{scrpage2}
\usepackage[bottom=1.1in, left=2in, top=0.6in, right=0.9in]{geometry}

\begin{document}
Dummy text\dots
\clearpage
More dummy text\dots
\clearpage
More dummy text\dots
\end{document}


When applied to your "no so minimal" example, the result looks as expected:

-
Thanks. I realized that this problem is complicated... I actually have two minipages side-by-side on this page I want to change the margins of. The left minipage is 1/3 of textwidth broad, the right one 2/3. Now, by using changepage, suddenly the right minipage occupies 1/2 of the textwidth... I'm currently thinking about leaving the foot as is and just trying to change the placement of the content (which could be done with textpos for example). All a bit ugly I admit :-( – Marius Hofert Nov 27 '12 at 9:58
You can solve this issue by setting the width of the minipages in absolute dimensions (inches or centimeters) instead of a fraction of \textwidth. After all, you know the value of textwidth for this particular page, so you can make the computation. Using \texwidth is risky because probably its value is not affected by adjustwidth. – JLDiaz Nov 27 '12 at 10:00
Yes, but I'm a bit worried about having to change everything else just for changing the footer position... As you can see in the new (not-so-minimal) example, things get messed up quite a bit. If you can fix this, please post it, so I can accept it. Thanks. – Marius Hofert Nov 27 '12 at 10:45
Ok, I've updated my answer and tested the code with your example. – JLDiaz Nov 27 '12 at 11:09
great, thanks for helping! – Marius Hofert Nov 27 '12 at 12:52

Following the lead of Position of page numbers

Try the following code putting the following code in your preamble:

\makeatletter
\newcommand*{\ps@myfirstpage}{%
\let\@mkboth\@gobbletwo%
\def\@oddfoot{%
\reset@font%
\hfil%
\thepage%
\hspace*{0.3in}% the difference of the two right margins!
}%

and then on the first page call \thispagestyle{myfirstpage}