[Tex/LaTex] Setting Margins Exactly – Geometry Package

apa6geometrymarginsthesis

My University's thesis requirements for margins (letter paper 8.5in x 11in) are as follows:

Top: 1 inch;
Left: 1.25 inch;
Right: 1.25 inch; and
Bottom: 1.0 inch

I was/am having difficulty fulfilling these requirements using LaTeX. It's unclear to me whether or not the page numbering is pushing the first line of text further than the 1 inch top margin (e.g., 1.2 inches down?). I would like the first line of text to begin EXACTLY 1 inch below the top of the page and would like the page number to fit within the top margin space, so that it fits neatly there without sitting too close to the body of the text.

When you compile my MWE, look at pages 3 & 4. The manner in which these are displayed show the layout/spacing I have in my thesis. I would like more space between the page number and the body of text while preserving the 1 inch top margin.

\documentclass[man,12pt,floatsintext,longtable,noextraspace,natbib, tmargin=1in, lmargin=1in, rmargin=1in, bmargin=1in, tmargin=1in, lmargin=1.25in, rmargin=1.25in, bmargin=1in]{apa6}
\usepackage{layouts}
\usepackage{lipsum} % for dummy text only

%geometry and fancyhdr packages loaded automatically by apa6 document class.

@R. Shumacher showed me the layouts package to allow me to see my page defaults, which was helpful.

I set some page layout parameters manually in the preamble:

\setlength{\voffset}{0.0in}
\setlength{\topmargin}{0in}  
\setlength{\headsep}{0in}
\setlength{\headheight}{0in}
\setlength{\textheight}{9in}

\begin{document}
\titlepage

% Create Header information for Arabic Arabic Numbering.

\fancyhf{} % clear all header and footers
\renewcommand{\headrulewidth}{0pt} % remove the header rule
\setcounter{page}{1}
\pagenumbering{arabic}
\fancyheadoffset{0cm}  % This is so page number does not extend into right margin (thesis requirements).
\rhead{\thepage}  % Center the page number at the Footer
\pagestyle{fancy}

% Below uses commands from the "layouts" package in order to determine exact margin setup.

\drawdimensionstrue
\printinunitsof{in}
\pagediagram   % draws diagram with all layout vernacular identified (except bottom margin)
\pagevalues
\currentpage

enter image description here

\vspace{0.5in}
\lipsum
\end{document}

MWE is below. I would like more space between the page number and the body of the text WITHOUT pushing the body of the text greater than the required 1 inch margin.

\documentclass[man,12pt,floatsintext,longtable,noextraspace,natbib, tmargin=1in, lmargin=1in, rmargin=1in, bmargin=1in, tmargin=1in, lmargin=1.25in, rmargin=1.25in, bmargin=1in]{apa6}
\usepackage{layouts}
\usepackage{lipsum} % for dummy text only

\setlength{\voffset}{0.0in}
\setlength{\topmargin}{0in}  
\setlength{\headsep}{0in}
\setlength{\headheight}{0in}
\setlength{\textheight}{9in}

\begin{document}
\titlepage

\fancyhf{} % clear all header and footers
\renewcommand{\headrulewidth}{0pt} % remove the header rule
\setcounter{page}{1}
\pagenumbering{arabic}
\fancyheadoffset{0cm}  % This is so page number does not extend into right margin (thesis requirements).
\rhead{\thepage}  % Center the page number at the Footer
\pagestyle{fancy}

\drawdimensionstrue
\printinunitsof{in}
\pagediagram   % draws diagram with all layout vernacular identified (except bottom margin)
\pagevalues
\currentpage

\vspace{0.5in}
\lipsum
\end{document}

Best Answer

If this is literally the last thing you need to fix, the following should work.

Add this in your preamble:

\geometry{reset, letterpaper, height=9in, width=6in, hmarginratio=1:1, vmarginratio=1:1, marginparsep=0pt, marginparwidth=0pt, headheight=15pt}

Remove all manual settings for layout dimensions from the preamble. If you need to make adjustments, add them to the argument you feed \geometry{}.

So, with your MWE, my document looks like this:

adulterated layout

Close-up of layout dimensions:

layout dimensions

Note that this is right. You don't want the margins to be what they are meant to be, because you want the height of the header and the separation between the header and the text to be 'taken out' of the margin. You want \topmargin to be 0in minus the height of the header and the separation between header and text body. You want the left and right margins to be .25in. You want a text body of 6in by 9in. We let geometry figure out the actual values to feed everything.

[LaTeX has margins of 1in all round. These dimensions are additions to or subtractions from those. So a left margin of .25in in LaTeX's terms is a left margin of 1.25in in the terms of your thesis office. geometry offers the ability to enter either the commonsensical or the native dimensions, but here we let it do most of the calculations for us.]

Note also, that these are LaTeX's dimensions. These do not all have the same meaning as the same terms in geometry. But this seems to be what you want.

\documentclass[man,12pt,floatsintext,longtable,noextraspace,natbib,letterpaper]{apa6}
\usepackage{layouts}
\usepackage{lipsum} % for dummy text only

\geometry{reset, letterpaper, height=9in, width=6in, hmarginratio=1:1, vmarginratio=1:1, marginparsep=0pt, marginparwidth=0pt, headheight=15pt}

\begin{document}
\titlepage

\fancyhf{} % clear all header and footers
\renewcommand{\headrulewidth}{0pt} % remove the header rule
\setcounter{page}{1}
\pagenumbering{arabic}
\fancyheadoffset{0cm}  % This is so page number does not extend into right margin (thesis requirements).
\rhead{\thepage}  % Center the page number at the Footer
\pagestyle{fancy}

\drawdimensionstrue
\printinunitsof{in}
\pagediagram   % draws diagram with all layout vernacular identified (except bottom margin)
\pagevalues
\currentpage

\vspace{0.5in}
\lipsum
\end{document}