[Tex/LaTex] package keyval error: compat2 undefined

errorsgeometrykey-value

I am using MiKTeX 2.9, geometry v5.6. I am getting the following error
package keyval error: compat2 undefined.

The LaTeX code is attached here:

\documentclass[phD,synopsis,a4paper]{iitmdiss}
%\documentclass{article}
\usepackage[dvips]{graphicx}
\usepackage{amsmath,cite,epsfig,xcolor} % easier math formulae, align, subequation
%\usepackage{subfig}

\usepackage{times}
\usepackage{epstopdf}
\usepackage{enumerate}
\usepackage[small,it]{caption}
%\usepackage[countmax]{subfloat}
\usepackage{fancyhdr}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{subfigure}
%\usepackage[left=3cm,right=2.1cm,top=2.1cm,bottom=2.1cm]{geometry}
\usepackage[compat2, margin=2cm]{geometry}


\title{TITLE OF THESIS}

\author{NAME}

\date{MONTH YEAR}
\department{PHYSICS}


\begin{document}

%\nocite{*}
\maketitle



% The main text will follow from this point so set the page numbering
% to arabic from here on.
\pagenumbering{arabic}
\setcounter{page}{0}
%\newpage
\section{Introduction}
kdjflsadfj kjlksjdlkf
\section{Motivation, Objective and Scope}

\section{Summary of the Research Work}

\section{Conclusions}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Bibliography.

\begin{singlespace}
\begin{thebibliography}{10}
\addcontentsline{toc}{section}{Bibliography}

\bibitem{paper1}
Author 1 and Author 2
\newblock {\em Paper title}.
\newblock Journal\ \ {\bf Volume}, Page\ \ (Year).
\end{thebibliography}

\end{singlespace}



%%%%%%

\section{Proposed Contents of the Thesis}
The outline of the thesis is as follows:
\begin{enumerate}
\item Chapter 1 title
\item Chapter 2 title
\item ...
\end{enumerate}


%\vskip 4cm
%%%%%%
\section{Publications}
\subsection{Papers in Refereed Journals}
\begin{enumerate}
\item Title \\
    {\bf Author 1}, Author 2...\\
    {\it Journal title.}, {\bf Volume}, Page (Year)
\end{enumerate}

\subsection{Presentations in Conferences}
\begin{enumerate}
\item  Presented titled  {\em Title} at the {\bf Conference on...}  place, date..
\end{enumerate}


\end{document}

Best Answer

Whatever the geometry option compat2 is for, it’s not supported anymore:

Deleted options: compat2 and twosideshift. The version 5 has no longer compatibility with the previous ones. compat2 and twosideshift are gone for simplicity. (geometry documentation)

I don’t have the document class you’re using (iitmdiss), but if your document works without compat2 as well, just get rid of it.

On another topic: It’s recommended to use \textit{...} (or simply \emph{...}) or {\itshape ...} instead of {\it ...}, \textbf{...} or {\bfseries ...}, etc.: Does it matter if I use \textit or \it, \bfseries or \bf, etc

Also, you might get a little further with problems if you narrow down the issue more (in this case, singling out compat2). There’s some advice on that in I've just been asked to write a minimal example, what is that?. I contributed some hints there, too.