12

For some reason in the following code, changing the margin argument for the geometry package line does nothing to the document. Even if I comment out the geometry package it doesn't go back to the defaults. I made sure I'm opening up the right PDF, I even deleted the pdf file to make sure I was opening up the correct PDF. I'm trying to get the space at the bottom of the page to be less (for some odd reason, it is way too much by default.)

 \documentclass[12pt]{article}
\usepackage[showframe=false,headheight=1cm]{geometry}
\usepackage{fancyhdr} % for headers and footers
\usepackage{lipsum}   % for dummy text
\usepackage{setspace}
\usepackage[margin=1in,bottom=1in]{geometry}

\begin{document}

% headers
\fancyhead[L]{}
\fancyhead[C]{}
\fancyhead[R]{
\begin{minipage}{2in}
 \raggedleft 
\small Derper McDerp \\
\small Derponomics 101 \\
\small Dr. Derpy Derp
\end{minipage}}
\renewcommand{\headrulewidth}{0pt}

% footers
%\fancyfoot[L]{}
%\fancyfoot[C]{}
%\fancyfoot[R]{}

% need to specify the pagestyle as fancy
\pagestyle{fancy}
\doublespace

\section*{Essay 3}
\lipsum
\end{document}

Anyone know what is going on with the geometry package?

2
  • Why are you including the geometry package twice? Commented Nov 4, 2011 at 20:16
  • 1
    @Bre: Just a word on how some things on this site work: Other users are interested in knowing which solutions help the people who ask questions. You can indicate that by upvoting (clicking the thing pointing up that's left of the respective answer) answers that were helpful, and accepting (clicking the check mark underneath the voting buttons) the answer that helped you most. This is just about showing some gratitude toward people who helped you. Please consider upvoting and accepting some of the answers on your questions. More info at tex.stackexchange.com/faq#howtoask.
    – doncherry
    Commented Nov 4, 2011 at 22:14

1 Answer 1

11

Your MWE as is does not compile and results in

LaTeX Error: Option clash for package geometry.

But, loading the geometry package just once as:

\usepackage[showframe=true,headheight=1cm,margin=1in,bottom=1in]{geometry}

seems to work fine. Adjusting the setting bottom changes the margin as expected. For instance, using bottom=3in results in the following. I enabled showframe to see the effect.

enter image description here

As @egreg commented, the \geometry command can be used multiple times and the effects are cumulative. Perhaps you got confused with having multiple \geometry commands and the \usepackage options. So the following will yield the same results as above:

\usepackage{geometry}
\geometry{showframe=true,headheight=1cm}
\geometry{margin=1in,bottom=1in}
4
  • 7
    One can use the \geometry command multiple times, it has cumulative effect.
    – egreg
    Commented Nov 4, 2011 at 20:23
  • Good point. I will mention that in the answer. Commented Nov 4, 2011 at 20:25
  • and if you ever want to change the geometry, you can use \newgeometry...
    – cmhughes
    Commented Nov 5, 2011 at 1:37
  • Thank you. I'd was patching that code together with copying and pasting from examples which is how two geometry calls got in there. Oddly enough getting rid of the duplicate and combining the geometry arguments fixed the problem.
    – Bre
    Commented Nov 5, 2011 at 1:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .