Hi I have the following preamble in my thesis :
\documentclass[12pt,a4paper,twoside]{report}
\setlength{\textwidth}{17cm}
\setlength{\parskip}{3mm}
\setlength{\parindent}{0mm}
\usepackage[utf8]{inputenc}
\usepackage[top=2cm, bottom=2cm, left=2cm, right=2cm]{geometry}
\usepackage{graphicx}
\graphicspath{{images/}}
\usepackage{setspace}
\usepackage{epsfig}
\usepackage{filecontents}
\usepackage{xparse,nameref}
\usepackage{mathrsfs}
\usepackage[nokeyprefix]{refstyle}
\usepackage{mathtools}
\usepackage{thmtools}
\usepackage{enumerate}
\usepackage{enumitem}
\usepackage{thm-restate}
\usepackage{cleveref}
\usepackage{amsmath}
\usepackage{url}
\usepackage{amsthm}
\DeclareMathOperator{\lcm}{lcm}
\DeclareMathOperator{\ord}{ord}
\usepackage{cellspace}
\setlength\cellspacetoplimit{4pt}
\setlength\cellspacebottomlimit{4pt}
\usepackage{booktabs}
\setlength\defaultaddspace{2ex}
\usepackage{graphicx}
\usepackage{array}
\usepackage{tabularx,ragged2e,booktabs,caption}
\usepackage[figuresleft]{rotating}
\usepackage{rotating}
\newcolumntype{C}{>{\Centering\arraybackslash}X}
\newcommand\swb{{\scriptstyle\Box}} % "small white box"
\usepackage{mathtools}
\usepackage{tikz}
\usetikzlibrary{positioning}
\usetikzlibrary{arrows}
\setcounter{secnumdepth}{3}
\usetikzlibrary{shapes.multipart}
\usepackage{tabu}
\usepackage{amssymb,bm}
\usepackage{framed}
\usepackage{upgreek} %use uptau greek letter
\usepackage{comment} %choose parts not to compile
\usepackage{tikz}
\tikzset{mynode/.style={fill=white,text=black,font=\tiny,inner sep=1pt}}
\usepackage[toc,page]{appendix}
\addtolength{\topmargin}{0.5in}
\newenvironment{numberlists}[1][3\parindent] %for long numberlist command
{\begin{list}{}{%
\leftmargin=#1\relax
\rightmargin=\leftmargin
\itemsep=\jot
\parsep=0pt
\partopsep=0pt
\labelsep=0pt}}
{\end{list}}
\newcommand\numlist[2]{%
\item[]\makebox[0pt][r]{$#1=\lbrack$}%
\begingroup
\begingroup\lccode`~=`,\lowercase{\endgroup\def~}{\mathcomma\penalty0 }%
\mathcode`,="8000
\thinmuskip=6mu plus 6mu minus 2mu
$#2\rbrack$%
\endgroup
}
\mathchardef\mathcomma=\mathcode`, %end of numberlist command
\setlength{\oddsidemargin}{-1in} \setlength{\evensidemargin}{-1in}
\addtolength{\oddsidemargin}{20mm}\addtolength{\evensidemargin}{20mm}
\setlength{\marginparwidth}{40pt} \setlength{\marginparsep}{10pt}
\setlength{\topmargin}{-5mm} \setlength{\headsep}{0.5in}
\setlength{\textheight}{227mm} \setlength{\textwidth}{165mm}
\renewcommand\floatpagefraction{0.8} % Default = 0.5
\usepackage{listings}
\usepackage{color}
\definecolor{dkgreen}{rgb}{0,0.6,0}
\definecolor{gray}{rgb}{0.5,0.5,0.5}
\definecolor{mauve}{rgb}{0.58,0,0.82}
\lstset{
language=Java,
aboveskip=3mm,
belowskip=3mm,
showstringspaces=false,
columns=flexible,
basicstyle={\small\ttfamily},
numbers=none,
numberstyle=\tiny\color{gray},
keywordstyle=\color{blue},
commentstyle=\color{dkgreen},
stringstyle=\color{mauve},
breaklines=true,
breakatwhitespace=true,
tabsize=3
}
I know that my premable is a mess and am trying to fix it. The problem here is that i have \usepackage[top=2cm, bottom=2cm, left=2cm, right=2cm]{geometry}
and it does not seem to work because when I print my thesis the margin is different. top margin is 4.5 cm, bottom, left and right margin are all 2.5 cm. I think this has something to do with my numberlist command in my preamble (because there's a different margin set up in that command). Is there a way to fix it. The grad school refuse to accept my thesis for submission because of the margin issue. It should be 2cm top bottom left right.