One can do this by setting margin for (recto) odd pages using geometry, for example
\usepackage[margin={3cm,4cm}]{geometry}
or
\usepackage[margin=3cm,includeheadfoot]{geometry}
and then change localy the settings of (verso) even pages by
\def\@outputpage{%
\ifx\insertlist\@empty
\shipout\vbox to\@colht {\vss}%
\else
\begingroup
\addtolength{\oddsidemargin}{-1cm}
\addtolength{\topmargin}{-1.5cm}
\addtolength{\textwidth}{2cm}
\addtolength{\@colht}{3cm}
\setbox\@outputbox\vbox to\@colht {%
\expandafter\grabfirst\insertlist\@@
}%
\def\@oddhead{\thepage(x) \hfill EVEN PAGE}
\old@outputpage
\addtocounter{page}{-1}%
\endgroup
\fi
\old@outputpage}
If I run this sample document
\documentclass{book}
\usepackage[a4paper,pass,verbose]{geometry}
\usepackage{lipsum}
\begin{document}
\lipsum
\end{document}
I get, in the log file and on the console, the relevant lengths:
* \textheight=550.0pt
* \topmargin=22.0pt
* \headheight=12.0pt
* \headsep=18.06749pt
Rounding \headsep
is irrelevant, so I'll use 18pt:
\documentclass{book}
\usepackage[a4paper,verbose]{geometry}
\geometry{
inner=4cm,outer=1cm,
top=\dimexpr1in+22pt+12pt+18pt,% standard offset+topmargin+headheight+headsep
headheight=12pt,
headsep=18pt,
textheight=550pt,
}
\usepackage{lipsum}
\begin{document}
\lipsum
\end{document}
This prints
* \textheight=550.0pt
* \topmargin=22.0pt
* \headheight=12.0pt
* \headsep=18.0pt
which agrees with the standard setup.
With \documentclass[11pt,a4paper]{book}
(the twoside
and openright
options are on by default), the values obtained in the first step are
* \textheight=595.80026pt
* \topmargin=24.0pt
* \headheight=12.0pt
* \headsep=19.8738pt
so the change should be
\documentclass[11pt]{book}
\usepackage[a4paper,verbose]{geometry}
\geometry{
inner=4cm,outer=1cm,
top=\dimexpr 1in+24pt+12pt+19.8738pt,% standard offset+topmargin+headheight+headsep
headheight=12pt,
headsep=19.8738pt,
textheight=595.80026pt,
}
\usepackage{lipsum}
\begin{document}
\lipsum
\end{document}
with this setup I get as output
* \textheight=595.80026pt
* \topmargin=24.0pt
* \headheight=12.0pt
* \headsep=19.8738pt
Note that, in any case, LaTeX just looks at the values of \topmargin
, \headheight
, \headsep
and \textheight
; the bottom margin is whatever remains.
This is the output I get for the first page with the new settings
and this is the output without loading geometry
Best Answer
The only difference between
and
seems to be that the head height and the head separation in
fullpage
are zero.For the
in
default option, changemargin=1.5cm
intomargin=1in
.Just for experimenting, I compiled the same document with both preambles; the one with
geometry
with red text. I converted the DVI files to PNG with transparent background withdvipng
. Next I superimposed the two PNG files in a single document. Here's the picture showing no essential difference between the two.