Page Layout\geometry margins do not compile

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
rav01
Posts: 2
Joined: Mon Mar 02, 2020 9:42 am

\geometry margins do not compile

Post by rav01 »

Hey! I am completely new to latex and wrote my thesis in overleaf, however I noticed that the page margins do not compile anymore and the pagenumbers are much higher on the page than I want. Also I need them to be on the right side of the page but that is another problem.

If someone could check my code, I would be very grateful to get a suitable solution as this issue gives me more pages but not more content (my university checks content and pagenumbers).

Code: Select all

\documentclass[12pt, a4paper, oneside]{article}
\usepackage[utf8]{inputenc}
\usepackage[left=2.5cm, right=2.5cm, top=2.5cm, bottom=2.0cm, includehead, includefoot]{geometry} % also tried without includehead, includefoot, but does not work either
\usepackage{fancyhdr}
\usepackage{graphicx}
\usepackage[export]{adjustbox}
\usepackage{tikz}
\usepackage[toc,page]{appendix}
\usepackage[nottoc,numbib]{tocbibind}
\usepackage{setspace}
\usepackage{dirtytalk}
\usepackage{ragged2e}
\usepackage[version=4]{mhchem}
\usepackage{url}
\usepackage[super]{nth}
\usepackage{multirow}
\usepackage[skip=0.5\baselineskip]{caption}
\usepackage{changepage}
\usepackage{array}
\usepackage{xspace}
\usepackage[paper=portrait,pagesize]{typearea}
\usepackage{dcolumn}
\usepackage{longtable}
\usepackage{lscape}
\usepackage{rotating}
\usepackage{makecell}
\usepackage{float}
\usepackage{afterpage}

\usepackage{natbib}
\renewcommand\refname{Bibliography}
\setcitestyle{notesep={: }}
\setcitestyle{aysep={}}
\linespread{1.5}
\pagenumbering{Roman} % changed to Arabic after list of contents, and then back to Roman for Bibliography and Appendix
\begin{document}
\begin{titlepage}
I know that usually code is inserted better than this but I'm really new, so I don't know exactly how that works.
Attachments
Sample of pagenumber on page
Sample of pagenumber on page
Bildschirmfoto 2020-03-02 um 08.52.23.png (28.67 KiB) Viewed 7024 times
Last edited by cgnieder on Sun Mar 08, 2020 10:45 am, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

\geometry margins do not compile

Post by Johannes_B »

You are loading package typeare later. That most likely overwrites the geometry stuff.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
rav01
Posts: 2
Joined: Mon Mar 02, 2020 9:42 am

\geometry margins do not compile

Post by rav01 »

Thank you very much, this was indeed the command that caused this!
Post Reply