Odd numbered pages should always be right pages!
So you should always use \cleardoublepage
before changing page numbering, because it makes no sense to change page numbering on the left side of a double sided print:
\documentclass[twoside]{article}% It's better to tell already the class to use twoside!
\usepackage[showframe]{geometry}
\begin{document}
This is the first page; it should be a right page (recto).
\cleardoublepage
\pagenumbering{arabic}
This is the third page; it should be a right page, because changing page numbering should always be done on right pages!
\end{document}
If you simply wanted to suppress page number at the first page of an article, try:
\documentclass[twoside]{article}% It's better to tell already the class to use twoside!
\usepackage[showframe]{geometry}
\begin{document}
\title{Title}
\author{Me}
\maketitle\thispagestyle{empty}
\begin{abstract}A short abstract of the document.\end{abstract}
Some more text, e.g. a table of contents.
\clearpage
This is the second page; it should be a left page and numbered 2!
\end{document}
Note: You may use \cleardoublepage
before \pagenumbering
even at oneside documents, because in this case it would have the same result \clearpage
would have.
But, if you really, really must have odd pages left and even pages right, you may simply switch the margins (and the margin used for \marginpar
):
\documentclass[twoside]{article}% It's better to tell already the class to use twoside!
\usepackage[showframe]{geometry}
\makeatletter
\newcommand*{\flipmargins}{%
\clearpage
\setlength{\@tempdima}{\oddsidemargin}%
\setlength{\oddsidemargin}{\evensidemargin}%
\setlength{\evensidemargin}{\@tempdima}%
\if@reversemargin
\normalmarginpar
\else
\reversemarginpar
\fi
}
\makeatother
\begin{document}
This is the first page; it should be a right page (recto).
\flipmargins
\pagenumbering{roman}
This is the second page; it should be a left page (verso).
\end{document}
Using a page style like headings
you may also need to change the page style, e.g., to print the numbers near the outer margin. You may do this, using either scrpage2 or fancyhrd. Here an example using scrpage2
:
\documentclass[twoside]{article}% It's better to tell already the class to use twoside!
\usepackage[showframe]{geometry}
\usepackage[automark]{scrpage2}
\pagestyle{scrheadings}
\makeatletter
\newcommand*{\flipmargins}{%
\clearpage
\setlength{\@tempdima}{\oddsidemargin}%
\setlength{\oddsidemargin}{\evensidemargin}%
\setlength{\evensidemargin}{\@tempdima}%
\if@reversemargin
\normalmarginpar
\else
\reversemarginpar
\fi
\ifdim \evensidemargin>\oddsidemargin
\ihead{\headmark}%
\ohead[\pagemark]{\pagemark}%
\else
\ihead[\pagemark]{\pagemark}%
\ohead{\headmark}%
\fi
}
\makeatother
\begin{document}
\section{Normal pages}
This is the first page; it should be a right page (recto).
\flipmargins
\pagenumbering{roman}
\section{Inverse margin pages}
This is the second page; it should be a left page (verso).
\end{document}
Alternative:
One completely different alternative would be to fake the page number, given by \thepage
:
\documentclass[twoside]{article}% It's better to tell already the class to use twoside!
\usepackage[showframe]{geometry}
\makeatletter
\newcommand{\@arabicplusone}[1]{\@arabic{\numexpr #1+1\relax}}
\newcommand{\@romanplusone}[1]{\@roman{\numexpr #1+1\relax}}
\newcommand{\@Romanplusone}[1]{\@Roman{\numexpr #1+1\relax}}
\newcommand{\@alphplusone}[1]{\@alph{\numexpr #1+1\relax}}
\newcommand{\@Alphplusone}[1]{\@Alph{\numexpr #1+1\relax}}
\makeatother
\newcommand*{\pagenumberingplusone}[1]{%
\pagenumbering{#1plusone}\setcounter{page}{0}%
}
\begin{document}
This is the first page; it should be a right page (recto). See
page~\pageref{test}.
\clearpage\pagenumberingplusone{roman}
This\label{test} is the second page; it should be a left page (verso).
\end{document}
Disadvantage of this suggestion would be, that if a package uses page counter directly for something else but testing odd or even the result may be unexpected. The advantage of this suggestion would be, that pages with odd value of counter page
shows not only an even page number but will be handled to be a even=left page by LaTeX and every class or package that uses \c@page
or \value{page}
for the test (and vica versa).
\newgeometry
affects the following page, so moving it to be before \begin{titlepage}
will ensure that it effects the title page.
And since you probably want pages after the title page to have the original geometry, moving \restoregeometry
to be after \end{ttilepage}
, and before \newpage
will make it effective on the first page of the document.
Notes:
Code:
\documentclass[10pt, a4paper, titlepage, draft]{article}
% USING DRAFT BECAUSE WE DO NOT HAVE THE PDFs TO BE INCLUDED
\usepackage{geometry}
\usepackage{tikz}
\usepackage{graphicx}
\usetikzlibrary{calc}% ADDED !!!!!
\usepackage{showframe}% ADDED !!!!!
\usepackage{lipsum}% ADDED !!!!!
\newenvironment{changemargin}[2]{%
\begin{list}{}{%
\setlength{\leftmargin}{#1}%
\setlength{\rightmargin}{#2}%
}%
\item[]}
{\end{list}}
\begin{document}
\newgeometry{left=6.75cm, right=1.25cm, top=1.25cm, bottom=1.25cm}
\begin{titlepage}
%\newgeometry{left=6.75cm, right=1.25cm, top=1.25cm, bottom=1.25cm}
\mbox{}\hfill
\begin{minipage}[c]{8cm}
\flushright \textbf{University of ...}
\end{minipage}%
\hspace{0.5cm} % your specified distance
\begin{minipage}[c]{2.5cm}
\flushright \includegraphics[width=2.50cm]{logo.pdf}
\end{minipage}%
\begin{tikzpicture}[overlay, remember picture]
\useasboundingbox [fill=blue!20] ($ (current page.south west) + (1, 1) $) rectangle ($ (current page.north west) + (6.75, -1) $) ;
\draw [line width=0.01mm, blue] ($ (current page.north west) + (1, -1) $) rectangle ($ (current page.south east) + (-1, 1) $) ;
\draw ($ (current page.north west) + (9.625, -4.00) $) -- ($ (current page.north east) + (-1.25, -4.00) $) ;
\draw ($ (current page.south west) + (9.625, 4.00) $) -- ($ (current page.south east) + (-1.25, 4.00) $) ;
\node[anchor=south west, %anchor is upper left corner of the graphic
xshift=1.125cm, %shifting around
yshift=1.125cm]
at (current page.south west) %left upper corner of the page
{\includegraphics[width=5.25cm]{logo2.pdf}};
\end{tikzpicture}
\begin{changemargin}{0cm}{-0.25cm}
\centering
\vspace*{\baselineskip}
\vspace*{\baselineskip}
\rule{127mm}{1.6pt}\vspace*{-\baselineskip}\vspace*{2pt}
\rule{127mm}{0.4pt}\\[\baselineskip]
\vspace*{\baselineskip}
{\large \textbf{Title}}\\[\baselineskip]
{ Subtitle}\\[0.2\baselineskip]
\rule{127mm}{0.4pt}\vspace*{-\baselineskip}\vspace{3.2pt}
\rule{127mm}{1.6pt}\\[\baselineskip]
\vspace*{\baselineskip}
\end{changemargin}
\mbox{} \vfill \hfill
\begin{minipage}[c]{8cm}
\flushright \textbf{Faculty of Science}
\end{minipage}%
\hspace{0.5cm} % your specified distance
\begin{minipage}[c]{2.5cm}
\flushright \includegraphics[width=2.50cm]{logo3.pdf}
\end{minipage}%
\end{titlepage}
\restoregeometry
\newpage
\lipsum[1-12]% Added
\end{document}
Best Answer
I'm quoting this answer from stackoverflow:
As you can see (from the first layout displayed), the default page layout for
report
(and the other default classes), as @egreg pointed out, does define an outer margin larger than the ineer one.Since you jest passed to geometry the format for the body (with the
text={<textwidth, textheight>}
option), it doesn't change the page's default, just adjusting itself to it. In order to achieve what you expect, you must tellgeometry
what is the inner and outer margins lengths you expect. You can do that both withinner
andouter
options or withleft
andright
(orlmargin
,rmargim
, checkgeometry
doc, p. 9)EDIT: Just updating, following @daleif's comment: It's considered good typographical practice to use larger outer margins and smaller spines — for the sake of tradition or just to provide the reader a space for personal notes. There's a a wonderfully complete answer explaining that, by Yannis Lazarides (Actually, that question is closely related to yours).