1

to write my master's thesis, I'm using overleaf. I want the odd page numbers to be on the right where the even page numbers should be on the left side of the page. However, based on my measurements, it looks like the pages are somehow shifted in a way that the side with a page number has a bigger margin. I don't know what causes this. Thanks in advance.

\documentclass[a4paper,twoside]{article}

%packages used listed here%
\usepackage{mathptmx}
\usepackage{abstract}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[paperheight=11.0in,
  left=1.5in,right=1.0in,top=1.0in,bottom=1.5in,
  includefoot,heightrounded]{geometry}
\usepackage{titling}
\usepackage[absolute]{textpos}
\usepackage{natbib}
\usepackage{graphicx}
\usepackage[hidelinks]{hyperref}
\usepackage{titlesec}
\usepackage[labelfont=bf]{caption}
\usepackage{placeins}
\usepackage{mdframed}
\usepackage{xcolor}
\usepackage{url}
\usepackage{amsmath}
\usepackage{svg}
\usepackage{pdfpages}
\usepackage[super]{nth}

%page number on the right side
\usepackage{titleps}
\renewpagestyle{plain}{%
\sethead{}{}{}
\setfoot[\thepage][][]{}{}{\thepage}
}%
\pagestyle{plain}

%bibliography type
\bibliographystyle{plain}
%define abbreviations here
\usepackage[acronym,toc,nonumberlist]{glossaries}
\makeglossaries
\newacronym{lbs}{LBS}{Location Based System}
\newacronym{gps}{GPS}{Global Positioning System}
\newacronym{lbsn}{LBSN}{Location Based Social Network}
\newacronym{lbg}{LBG}{Location Based Gaming}
\newacronym{sms}{SMS}{Short Message Service}
\newacronym{gprs}{GPRS}{General Packet Radio Service}
\newacronym{wifi}{WIFI}{Wireless Fidelity}
\newacronym{e2ee}{E2EE}{End-to-end Encryption}
\newacronym{des}{DES}{Data Encryption Standart}
\newacronym{mms}{MMS}{Multimedia Messaging Service}
\newacronym{cspng}{CSPNG}{Cryptographically Secure Pseudorandom Number Generator}
\newacronym{kdf}{KDF}{Key Derivation Function}
\newacronym{aes}{AES}{Advanced Encryption Standart}
\newacronym{pbkdf2}{PBKDF2}{Password Based Key Derivation Function 2}
\newacronym{lan}{LAN}{Local Area Network}
\newacronym{ap}{AP}{Access Point}
\newacronym{mac}{MAC}{Media Access Control}
\newacronym{dos}{DOS}{Denial-of-Service}
\newacronym{prng}{PRNG}{Pseudo Random Number Generator}
\newacronym{sha}{SHA}{Secure Hash Algorithms}


%start modify section sizes
\titleformat*{\section}{\Huge\bfseries}
\titleformat*{\subsection}{\Large\bfseries}
\titleformat*{\subsubsection}{\large\bfseries}
\titleformat*{\paragraph}{\normalfont\normalsize}
\titlespacing*{\section} {0pt}{6ex plus 4ex minus .2ex}{3ex plus .3ex}
\titlespacing*{\subsection} {0pt}{2.25ex plus 1ex minus .2ex}{3ex plus .3ex}
\setlength\parindent{0.5cm}
\renewenvironment{abstract}{\subsection*{\center\abstractname}}{}

%modify textbox style
% all 4 borders
\newmdenv{allfour}
% just top and bottom
\newmdenv[leftline=false,rightline=false]{topbot}
% just left and bottom
\newmdenv[topline=false,rightline=false]{leftbot}
\newmdenv[
  topline=false,
  bottomline=false,
  rightline=false,
  skipabove=\topsep,
  skipbelow=\topsep,
  leftmargin=15pt,
  rightmargin=5pt,
  innertopmargin=0pt,
  innerbottommargin=0pt
]{leftbox}

%start cover information%
\setlength{\droptitle}{10em}
\title{Master Thesis}
\author{Eroglu, Ahmet}
\date{March 2019}
%finish cover information

% table of contents depth should be 2 for distributed systems department!
\setcounter{tocdepth}{2}

\begin{document}
\input{Chapters/cover_main.tex}
\input{Chapters/abstract.tex}
\input{Chapters/table_of_contents.tex}
\input{Chapters/chapter_introduction/introduction.tex}
\input{Chapters/chapter_related_work/related_work.tex}
\input{Chapters/chapter_designed_solution/designed_solution.tex}
\input{Chapters/chapter_evaluation/chapter_evaluation.tex}
\input{Chapters/chapter_improved_version/improved_version.tex}
\input{Chapters/chapter_future_work/future_work.tex}
\input{Chapters/appendix.tex}
\newpage
\bibliographystyle{plain}
\input{Chapters/abbreviations_page.tex}
\input{Chapters/acknowledgements.tex}
\bibliography{references}
\end{document}

enter image description here

3
  • What you see is normal: in typographic tradition,two-sided documents have an outer margin larger than the inner margin, just because when you open a book, you see two inner margins.
    – Bernard
    Jul 17, 2019 at 16:30
  • Please see also this: cms.uni-konstanz.de/fileadmin/informatik/ag-saupe/Webpages/… Here they are asking for KOMA-Script, that means class scrreport or scrbook ...
    – Mensch
    Jul 17, 2019 at 16:58
  • @Mensch Thank you very much for the answer, as well as the above link. I appreciate that. Jul 17, 2019 at 19:25

1 Answer 1

2

Well, usually a master thesis would use class report or book instead of article (because you will need \chapter{} to give your thesis a structure) ...

Nevertheless see the following minimalised code:

\documentclass[a4paper,twoside]{article} % <============================ report??

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[%
  paperheight=11.0in,
% left=1.5in,right=1.0in,top=1.0in,bottom=1.5in,
  outer=1.5in,inner=1.0in,top=1.0in,bottom=1.5in, % <===================
  includefoot,heightrounded,
  showframe % <=========================================================
]{geometry}

\usepackage{blindtext} % <==============================================
\usepackage{xurl} % <=================================================== better url breaking
\usepackage[hidelinks]{hyperref} % <====================================

\begin{document}
\Blinddocument
\end{document}

To get a proper layout for twoside document you need to use options outer=1.5in,inner=1.0in, instead your used left and right.

Please see the following result:

resulting pdf

Option showframe for geometry is only used to visualize the typing area and margins ... You can see the smaller inner margin and the bigger outer margin ... Please see the changed order of calls: hyperref should be called last in your case and xurl gives you a better line breaking in urls ...

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.