What are the precise dimensions of the margins for an a4paper, report document without geometry?
They are in columns two and three of the table for oneside
and twoside
. (the 62pt allocated to the margins are split in a different way). The code shows how to get this values.
But, more important, you also wanted to keep the original layout of the cover while changing the document to twoside
. As you suggested it can be done with the package geometry
, loaded with appropriate parameters for report
oneside
and then recover the twoside
with \newgeometry
.
Test to be done with the code provided:
(1) Use \documentclass[12pt,a4paper]{report}
and comment both \usepackage[...]{geometry}
and \newgeometry[...]
(placed before \chapter
).
You should get the values of the second column of the table (report oneside)
, both in "Geometry of the title page" and in "Geometry of the document".
(2) Now use \documentclass[12pt,a4paper, twoside]{report}
keeping the two lines commented.
You will get the values of the third column, report twoside
, both for the cover and the rest of the document.
This is something undesirable because it changes the layout of the cover.
(3) Un-comment only \usepackage[...]{geometry}
. You recover the values of oneside
for everything.
Fourth column of the table. One more step to go.
(4) Un-comment also \newgeometry[...]
placed before \chapter
. Now you will get the the values for report twoside
in "Geometry of the document" (fifth column) while keeping the oneside
values for "Geometry of the title page" (fourth column). The desired result.
This is the code
%\documentclass[12pt,a4paper]{report} % used to write the document
\documentclass[12pt,a4paper,twoside]{report} % required to print the document
\usepackage[textwidth= 390.0pt,
textheight =592.0pt,
left= 103.27pt, % 1in + 31pt
top= 92.27pt, % 1in + 20pt
marginparwidth= 85pt,
includemp,
includehead]{geometry} % reproduce report oneside layout
\title{Draft title of the report}
\author{Only one}
\begin{document}
\setlength{\parindent}{0pt}
\textbf{\large Geometry of the title page}
\medskip
textwidth= \the\textwidth
textheight= \the\textheight
oddsidemargin= \the\oddsidemargin
evensidemargin= \the\evensidemargin
topmargin= \the\topmargin
headheight= \the\headheight
headsep= \the\headsep
topskip= \the\topskip
footskip= \the\footskip
marginparwidth= \the\marginparwidth
marginparsep= \the\marginparsep
\maketitle
\newgeometry{twoside, % recover report twoside layout
textwidth= 390.0pt,
textheight= 592.0pt,
left= 82.27pt, % 1in + 10pt
top= 92.27pt, % 1in + 20pt
marginparwidth= 85pt,
includemp,
includehead}
\chapter{Measurements}
\textbf{\large Geometry of the document}
\medskip
\setlength{\parindent}{0pt}
textwidth= \the\textwidth
textheight= \the\textheight
oddsidemargin= \the\oddsidemargin
evensidemargin= \the\evensidemargin
topmargin= \the\topmargin
headheight= \the\headheight
headsep= \the\headsep
topskip= \the\topskip
footskip= \the\footskip
marginparwidth= \the\marginparwidth
marginparsep= \the\marginparsep
\bigskip
\begin{tabular}{lcccc}
\hline
& report 1s & report 2s & geometry \& 2s & +newgeometry \& 2s \\
& cover + pages & cover + pages & cover + pages & only pages \\ \hline
textwidth & 390.0pt & 390.0pt & 390.0pt & 390.0pt \\
textheight & 592.0pt & 592.0pt & 592.0pt & 592.0pt \\
oddsidemargin & 31.0pt & 10.0pt & 31.0pt & 10.0pt \\
evensidemargin & 31.0pt & 52.0pt & 31.97pt & 52.97pt \\
topmargin & 20.0pt & 20.0pt & 20.0pt & 20.0pt \\
headheight & 12.0pt & 12.0pt & 12.0pt & 12.0pt \\
headsep & 25.0pt & 25.0pt & 25.0pt & 25.0pt \\
topskip & 12.0pt & 12.0pt & 12.0pt & 12.0pt \\
footskip & 30.0pt & 30.0pt & 30.0pt & 30.0pt \\
marginparwidth & 85.0pt & 85.0pt & 85.0pt & 85.0pt \\
marginparsep & 10.0pt & 10.0pt & 10.0pt & 10.0pt \\ \hline
\end{tabular}
\end{document}
geometry
package has the optionpass
use this as a first option while loading ... I think this is what you are looking for. This option tells geometry to not change the current geometry before use the rest of the options passed in the command (or the load of the package)pass
option. Adding it in the preamble makes all the margins as the default ones which is great. Unfortunately addingtwoside
option doesn't work. If I add such option by means ofnewgeometry
I get all the preamble options disabled and the margins are changed. I checked the package documentationpass
option disable al geometry package with the exception ofshowframe
andverbose