I am new to LaTeX and in my first article I am facing the following problem. Although I set the margins to 1 in all around the A4 page, the text does not justify till the end of the right margin. It justifies almost one 1 in before the margin. Header and footer follow the margins but the texts isn't.

\usepackage[lmargin=2.5cm, rmargin=2.5cm,tmargin=2.50cm,bmargin=2.50cm]{geometry}
\fancyhead[l]{MSc Lift Engineering\\LIFM005DL-Assignment LCK}
\fancyhead[r]{Christoforos Milionis}
\fancyfoot[r]{Page \thepage\ of \pageref{LastPage}}
\author{Christoforos Milionis}
\title{2nd Assignment}
\LARGE\textbf\\ Oadsdadsn \\
\Large dassdasdas
\LARGE \textbf{dhdjdj uygkygk}\\
\large Student No. jyfgkugy
\large \ \ \ \ \ \ \textbf{Supervisor}
\par  \ \  hgfhdfj hgkhg
\section{Assignment Brief}

This is the preamble.


You have a very big header for the default header height; so fancyhdr warns you and pushes the material down the page. This is what you get in your log file

Package Fancyhdr Warning: \headheight is too small (12.0pt):
 Make it at least 27.18335pt.
 We now make it that large for the rest of the document.
 This may cause the page layout to be inconsistent, however.

Never underestimate warnings; for instance you get also other warnings, see later.

A way to fix it is to say


The other warning you get is

(\end occurred inside a group at level 1)

### semi simple group (level 1) entered at line 48 (\begingroup)
### bottom level

which is due to incorrect usage of \doublespace which should be \doublespacing.

Also move \begin{titlepage} after \begin{document}.


The problem is a faulty construction of the titlepage environment. You can cut down the example to


Notice that \begin{document} is inside the titlepage environment. This is not correct and messes up some of the margin setting. Try moving this line


(I've simplified the application of margins in geometry.)


load the package layout and then after \begin{document} write \layout. Then you can see your margin settings in the output:

enter image description here

  • Thank you for the response.I did that, the margins seem to be okay but on the layout the bottom and right margin are not shown. – chris Apr 24 '13 at 8:02
  • the above image shows exactly your layout. I used your preamble setting. – user2478 Apr 24 '13 at 8:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.