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).
I'm quoting this answer from stackoverflow:
For debugging page layout, Peter Wilson's layouts package is the way to go. Here's an example for visualising the page design and seeing the dimensions used for it
\documentclass[a4paper,12pt]{report}% I didn't add the twoside option in order to only display the right page layouts
\usepackage{layouts}
\usepackage{geometry}
\begin{document}
First you see the default page layout:
\currentpage
\pagedesign
\clearpage
\newgeometry{text={155mm, 24cm}, top=25mm}
Now you can check the page layout you passed to geometry:
\currentpage
\pagedesign
\clearpage
\newgeometry{inner=16.5mm,outer=11mm,top=25mm}
and then check the possible layout you expected (I'm assuming you're using A4 paper)
\currentpage
\pagedesign
\clearpage
\end{document}
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 tell geometry
what is the inner and outer margins lengths you expect. You can do that both with inner
and outer
options or with left
and right
(or lmargin
, rmargim
, check geometry
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).
Best Answer
The typesetting area in ConTeXt comprises twenty five areas (
cutspace
is missing in the figure):You only need to set up text area and footer (for the page number):
\setuppagenumbering[alternative=doublesided]
switches to the mirrored layout on even pages. When the top area and the header is set to zero,topspace
states the distance from the top of the paper to the text area andbackspace
the distance from the left to the text.cutspace
is the distance from the right of the text to the paper. For these to apply correctly,width=fit
needs to be set.The distance from the bottom of the text to the paper cannot be set directly but can be computed. The
5cm
in theheight=
line states the distance from the bottom of the text to the bottom of the paper.