-1

I am using the following .tex template borrowed from my colleague:

\documentclass[11pt,twoside]{book}
\usepackage{a4wide}
\usepackage{fancyhdr}
\usepackage[dvips]{epsfig}
\usepackage{palatino,float,subfigure,shadow,fancybox,amsfonts,appendix}
\usepackage{stmaryrd}
\usepackage[nottoc]{tocbibind}
\usepackage{makeidx}
\pagestyle{fancy} \makeindex %\authorindex

\renewcommand{\headrulewidth}{.1pt} \fancyhead[LE,RO]{{\thepage}} \fancyhead[RE]{\nouppercase{{\leftmark}}} \fancyhead[LO]{\nouppercase{{\rightmark}}} \fancyfoot{} \def\baselinestretch{1.1} \pagenumbering{roman} \date{\today} \clubpenalty=10000 \widowpenalty=10000

\newcommand*\chancery{\fontfamily{pzc}\selectfont} \usepackage{dcolumn}% Align table columns on decimal point \usepackage{bm}% bold math \usepackage{hyperref} \usepackage{upgreek} \usepackage[utf8]{inputenc} \usepackage{mathrsfs} \usepackage{alltt} \usepackage{tikz-cd} \usepackage{aliascnt} \usepackage{tikz} \usepackage{mathtools} \usepackage{multicol} \usepackage{charter} \usepackage{relsize}

\usepackage{amsmath,amssymb,amsthm,graphicx,amsxtra, setspace}

\usepackage{type1cm,eso-pic} \allowdisplaybreaks \usepackage{scalerel,stackengine} \stackMath \newcommand\reallywidehat[1]{% \savestack{\tmpbox}{\stretchto{% \scaleto{% \scalerel*[\widthof{\ensuremath{#1}}]{\kern-.6pt\bigwedge\kern-.6pt}% {\rule[-\textheight/2]{1ex}{\textheight}}%WIDTH-LIMITED BIG WEDGE }{\textheight}% }{0.5ex}}% \stackon[1pt]{#1}{\tmpbox}% } \parskip 1ex

\theoremstyle{definition} \newtheorem{theorem}{Theorem}[section] \newtheorem{lemma}[theorem]{Lemma} \newtheorem{proposition}[theorem]{Proposition} \newtheorem{corollary}[theorem]{Corollary} \newtheorem{definition}[theorem]{Definition} \newtheorem{example}[theorem]{Example} \newtheorem{remark}[theorem]{Remark}

\renewcommand{\theequation}{\arabic{section}.\arabic{equation}} \newcommand{\mainidx}[1]{{\it #1}} \newcommand{\boldidx}[1]{{\bf #1}}

\DeclareMathOperator*{\esssup}{ess,sup} \DeclareMathOperator{\tr}{Tr}

\makeatletter \newcommand{\doublewidetilde}[1]{{% \mathpalette\double@widetilde{#1}% }} \newcommand{\double@widetilde}[2]{% \sbox\z@{$\m@th#1\widetilde{#2}$}% \ht\z@=.9\ht\z@ \widetilde{\box\z@}% } \makeatother

\newcommand{\mc}{\mathcal} \newcommand{\mf}{\mathfrak} \newcommand{\mb}{\mathbb} \newcommand{\xra}{\xrightarrow} \newcommand{\ra}{\rightarrow} \newcommand{\rra}{\rightrightarrows}

\renewcommand{\d}{/\mathrm{d}/} \renewcommand{\thefootnote}{\arabic{footnote}}

\def\listofsymbols{\input{symbols} \cleardoublepage} \def\addsymbol #1: #2#3{$#1$ > \parbox{5in}{#2 \dotfill \pageref{#3}}\} \def\newnot#1{\label{#1}}

\hypersetup{ %bookmarks=true, % show bookmarks bar? unicode=false, % non-Latin characters in Acrobat�s bookmarks pdftoolbar=true, % show Acrobat�s toolbar? pdfmenubar=true, % show Acrobat�s menu? pdffitwindow=false, % window fit to page when opened pdfstartview={FitH}, % fits the width of the page to the window pdftitle={My title}, % title pdfauthor={Author}, % author pdfsubject={Subject}, % subject of the document pdfcreator={Creator}, % creator of the document pdfproducer={Producer}, % producer of the document pdfkeywords={keywords}, % list of keywords pdfnewwindow=true, % links in new window colorlinks=true, % false: boxed links; true: colored links linkcolor=blue, % color of internal links citecolor=blue, % color of links to bibliography filecolor=magenta, % color of file links urlcolor=green % color of external links }

\newcommand {\apgt} {\ {\raise-.5ex\hbox{$\buildrel>\over\sim$}}\ } \newcommand {\aplt} {\ {\raise-.5ex\hbox{$\buildrel<\over\sim$}}\ }

\makeatletter \def\myfnt{\ifx\protect@typeset@protect\expandafter\footnote\else\expandafter@gobble\fi} \makeatother

\begin{document} \doublespace \include{Title} \pagenumbering{arabic} \setcounter{page}1 \newpage \thispagestyle{empty} \cleardoublepage

\setcounter{secnumdepth}{3} % organisational level that receives a numbers
\tableofcontents

\newpage
\newpage
\thispagestyle{empty} 
\include{Preliminaries}
\include{chapter2}
\include{chapter3}
\include{chapter4}
\include{chapter5}
\include{chapter6}


%The style you want to use for references.
\newpage
\thispagestyle{plain}\chapter*{Publications arising out of the PhD
    thesis\hfill} \addcontentsline{toc}{chapter}{Publications arising
    out of the PhD thesis}
\begin{enumerate}
    \item [{[1]}]  
\end{enumerate}
\clearpage
\newpage
\thispagestyle{empty}
\bigskip{}
\vspace{1cm} \cleardoublepage



\bibliography{references}
\bibliographystyle{plain}


\singlespace
\printindex %\printauthorindex

\end{document}

Can some one help me to remove the obsolete commands in the file (commands which are present and don't serve any purpose).

  • 4
    Nobody knows what \include{chapter2} or \include{chapter3} contains. So how should we know if you load an unnecessary package. – Roland Mar 04 '21 at 05:42
  • https://en.wikibooks.org/wiki/LaTeX/Scientific_Reports#Can_I_use_the_template_of_a_friend_or_one_I_found_online? – Johannes_B Mar 04 '21 at 05:52
  • 1
    A good start would be stop loading packages more than once. Surely you can do this on your own. If you need an example of a package that's loaded more than once, do look around for graphicx -- why on earth do you load it three times? Once you're done with that purge, you could start thinking about which packages aren't needed at all for your document. – Mico Mar 04 '21 at 06:07
  • @Mico You are right :) I am doing that now :) – Praphulla Koushik Mar 04 '21 at 06:11
  • @Mico I edited. Now every package shows up only once. – Praphulla Koushik Mar 04 '21 at 06:18
  • @Roland Are there anything else you find to be obsolete other than \include{chapter}? – Praphulla Koushik Mar 04 '21 at 06:19
  • The next step, as noted in my earlier message, is to check whether your document really needs that many packages. You should also ask yourself if you need both graphics and graphicx (hint: you don't; keep only the latter) and both color and xcolor (hint: you don't; keep the latter). Does your document really feature nine [!] separate theorem-like environments? – Mico Mar 04 '21 at 06:34
  • @Mico I like the style you write your comments :D "Does your document really feature nine [!] separate theorem-like environments?" I use almost all, theorem, lemma, proposition, corollary, definition, example, remark.. Is 7 also too much? Is there a way to write this in a better way? I edited the code and removed 2 theorem-like environments – Praphulla Koushik Mar 04 '21 at 06:42
  • Obsolete is TeX engine you are using too. It seems (from \usepackage{inputenc} and from pzcr font) that you are using 8-bit pdftex. But now, we have Unicode luatex or xetex. – wipet Mar 04 '21 at 07:11
  • @wipet so how do I change to the new version? – Praphulla Koushik Mar 04 '21 at 07:59

3 Answers3

8

Your document preamble is a real mess and I think it's useful to give some guidelines.

  • a4wide has been deprecated for more than 20 years

  • epsfig only exists for compatibility with two decade old document

  • palatino has been deprecated for more than 20 years (use mathpazo or newpxtext,newpxmath)

  • subfigure is deprecated

  • float is unlikely to be useful (its [H] option for floats isn't useful)

  • type1cm is obsolete

  • DON'T use \def

  • Why so many braces in the settings for fancyhdr?

  • \it and \bf have been deprecated for a quarter of a century

  • \renewcommand\d{...} is very dangerous, don't do it; I suggest \dd

Next, group packages according to their job. It will be easier to check for duplications and maybe to solve little incompatibilities by moving them around.

Reserve a section to general settings, such as defining page styles to be used later.

Place document specific new commands in a dedicated section.

A final section for document specific settings, such as line spacing, \parskip and so on. By the way, a nonzero \parskip together with \doublespacing will produce very wide white stripes.

\documentclass[11pt,twoside]{book}

%%% Packages % 1. fonts \usepackage[T1]{fontenc} % recommended %\usepackage[utf8]{inputenc} % no longer needed \usepackage{fix-cm} % for Computer Modern (comment if using the next line) %\usepackage{newpxtext,newpxmath} % for Palatino %\usepackage{upgreek} % do you need it? %\usepackage{charter} % it has no support for math %\usepackage{relsize} % do you need it?

% 2. Math \usepackage{stmaryrd} \usepackage{mathrsfs} \usepackage{amsmath} %\usepackage{amsfonts} % loaded by amssymb \usepackage{amssymb} \usepackage{mathtools} \usepackage{bm}% bold math

% 3. Graphics and special effects \usepackage{graphicx} \usepackage{tikz} \usepackage{tikz-cd} \usepackage{shadow}% do you need it? \usepackage{fancybox}% do you need it? \usepackage{scalerel,stackengine} \usepackage{eso-pic}

% 4. Document formatting \usepackage{setspace} \usepackage{fancyhdr} \usepackage{appendix} \usepackage[nottoc]{tocbibind} \usepackage{alltt} \usepackage{amsthm}

% 5. Utilities \usepackage{makeidx} \usepackage{aliascnt} \usepackage{multicol} \usepackage{dcolumn}% Align table columns on decimal point

% 6. Cross references and hyperlinks \usepackage{hyperref}

%%% General settings % 1. fancyhdr \renewcommand{\headrulewidth}{.1pt} \fancyhf{} % clear all fields \fancyhead[LE,RO]{\thepage} \fancyhead[RE]{\nouppercase{\leftmark}} \fancyhead[LO]{\nouppercase{\rightmark}}

% 2. stackengine \stackMath

% 3. hyperref \hypersetup{ %bookmarks=true, % show bookmarks bar? unicode=false, % non-Latin characters in Acrobat�s bookmarks pdftoolbar=true, % show Acrobat�s toolbar? pdfmenubar=true, % show Acrobat�s menu? pdffitwindow=false, % window fit to page when opened pdfstartview={FitH}, % fits the width of the page to the window pdftitle={My title}, % title pdfauthor={Author}, % author pdfsubject={Subject}, % subject of the document pdfcreator={Creator}, % creator of the document pdfproducer={Producer}, % producer of the document pdfkeywords={keywords}, % list of keywords pdfnewwindow=true, % links in new window colorlinks=true, % false: boxed links; true: colored links linkcolor=blue, % color of internal links citecolor=blue, % color of links to bibliography filecolor=magenta, % color of file links urlcolor=green % color of external links }

%%% Personal commands \newcommand*\chancery{\fontfamily{pzc}\selectfont}

\newcommand\reallywidehat[1]{% \savestack{\tmpbox}{\stretchto{% \scaleto{% \scalerel*[\widthof{\ensuremath{#1}}]{\kern-.6pt\bigwedge\kern-.6pt}% {\rule[-\textheight/2]{1ex}{\textheight}}%WIDTH-LIMITED BIG WEDGE }{\textheight}% }{0.5ex}}% \stackon[1pt]{#1}{\tmpbox}% }

\theoremstyle{definition} \newtheorem{theorem}{Theorem}[section] \newtheorem{lemma}[theorem]{Lemma} \newtheorem{proposition}[theorem]{Proposition} \newtheorem{corollary}[theorem]{Corollary} \newtheorem{definition}[theorem]{Definition} \newtheorem{example}[theorem]{Example} \newtheorem{remark}[theorem]{Remark}

\newcommand{\mainidx}[1]{\textit{#1}} \newcommand{\boldidx}[1]{\textbf{#1}}

\DeclareMathOperator*{\esssup}{ess,sup} \DeclareMathOperator{\tr}{Tr}

\makeatletter \newcommand{\doublewidetilde}[1]{{% \mathpalette\double@widetilde{#1}% }} \newcommand{\double@widetilde}[2]{% \sbox\z@{$\m@th#1\widetilde{#2}$}% \ht\z@=.9\ht\z@ \widetilde{\box\z@}% } \makeatother

\newcommand{\mc}{\mathcal} \newcommand{\mf}{\mathfrak} \newcommand{\mb}{\mathbb} \newcommand{\xra}{\xrightarrow} \newcommand{\ra}{\rightarrow} \newcommand{\rra}{\rightrightarrows} \newcommand{\dd}{\mathop{}!\mathrm{d}} \newcommand {\apgt} {\ {\raise-.5ex\hbox{$\buildrel>\over\sim$}}\ } \newcommand {\aplt} {\ {\raise-.5ex\hbox{$\buildrel<\over\sim$}}\ }

\newcommand\listofsymbols{\input{symbols} \cleardoublepage} \newcommand{\addsymbol}{}% for safety \def\addsymbol #1: #2#3{$#1$ &gt; \parbox{5in}{#2 \dotfill \pageref{#3}}\} \newcommand\newnot[1]{\label{#1}} \makeatletter \newcommand\myfnt{\ifx\protect@typeset@protect\expandafter\footnote\else\expandafter@gobble\fi} \makeatother

%%% Last minute settings

\pagestyle{fancy} \makeindex %\authorindex

\doublespacing \linespread{1.1} \clubpenalty=10000 \widowpenalty=10000 \allowdisplaybreaks \setlength{\parskip}{1ex plus 0.5ex minus 0.1ex} \counterwithin{equation}{section} \setcounter{secnumdepth}{3} % organisational level that receives a numbers

%\date{\today}

\begin{document}

\pagenumbering{roman}

\include{Title}

\cleardoublepage \pagenumbering{arabic}

\tableofcontents

\include{Preliminaries} \include{chapter2} \include{chapter3} \include{chapter4} \include{chapter5} \include{chapter6}

\chapter*{Publications arising out of the PhD thesis\hfill} \addcontentsline{toc}{chapter}{Publications arising out of the PhD thesis} \begin{enumerate} \item [{[1]}]
\end{enumerate}

\bibliography{references} \bibliographystyle{plain}

\cleardoublepage \singlespacing \printindex %\printauthorindex

\end{document}

egreg
  • 1,121,712
  • Very nice! (+1). Does mathtools load amsmath? – Zarko Mar 04 '21 at 10:27
  • This is giving error to me ... "Illegal parameter number in definition of \newnot. \newcommand\newnot#" "Missing \begin{document}. \newcommand\newnot#1" "Illegal parameter number in definition of \reserved@a. \newcommand\newnot#1{\label{#1}" "Undefined control sequence. \counterwithin" "Missing \begin{document}. \counterwithin{e" – Praphulla Koushik Mar 04 '21 at 11:24
  • @PraphullaKoushik Sorry, I removed \def but didn't fix the parameter text. Fixed now. – egreg Mar 04 '21 at 11:52
  • @egreg It still says "Undefined control sequence. \counterwithin" – Praphulla Koushik Mar 04 '21 at 12:01
  • 1
    @PraphullaKoushik You have a very old LaTeX distribution, probably. Substitute with \numberwithin{equation}{section}. – egreg Mar 04 '21 at 12:06
  • how do I change the latex distribution? with "\numberwithin{equation}{section}" it is coming correctly. not showing any error – Praphulla Koushik Mar 04 '21 at 12:11
  • @PraphullaKoushik - Since you haven't told us yet which TeX distribution (and which vintage) you employ, it's well-nigh impossible to give you sensible advice. Please do reveal which TeX distribution (MikTeX? TeXLive? something else?) you employ and when it was last updated. – Mico Mar 04 '21 at 12:19
  • @PraphullaKoushik It depends on what operating system you're running and what TeX distribution – egreg Mar 04 '21 at 12:19
  • running "pdflatex --version" in terminal I got pdfTeX 3.14159265-2.6-1.40.18 (TeX Live 2017/Debian) kpathsea version 6.2.3 Copyright 2017 Han The Thanh (pdfTeX) et al. There is NO warranty. Redistribution of this software is covered by the terms of both the pdfTeX copyright and the Lesser GNU General Public License. For more information about these matters, see the file named COPYING and the pdfTeX source. Primary author of pdfTeX: Han The Thanh (pdfTeX) et al. Compiled with libpng 1.6.34; using libpng 1.6.34 Compiled with zlib 1.2.11; using zlib 1.2.11 Compiled with poppler version 0.62.0 – Praphulla Koushik Mar 04 '21 at 12:21
  • I am using ubuntu 18.04 LTS – Praphulla Koushik Mar 04 '21 at 12:22
6

Let me take the following stab at addressing the substance of your question.

  • Don't load packages more than once. Absolutely nothing good will come of it. Making sure that any package is loaded only once should be fairly easy to accomplish, right?

  • Don't load both color and xcolor, or both graphics and graphicx. Hint: work with xcolor and graphicx.

  • Don't define more theorem-like environments than you really need.

  • Obsolete and deprecated packages: It takes a bit more experience to figure out which packages belong in this group. Start by not loading subfigure and epsfig. You also load several text font packages whose code gets clobbered later on, when additional font packages get loaded. E.g., what are you trying to accomplish by loading palatino, charter, and type1cm?

  • Your document's preamble is a mess in part because no grouping of commands by theme or purpose seems to have been performed. Suggestion: Immediately after loading a package, execute the instructions from that package you deem necessary. E.g., after loading fancyhdr, don't load several more packages, then run \pagestyle{fancy}, then run \makeidx, and then (re)define the fancy page parameters. Is it really that hard to apply some grouping?

  • Don't load packages by hand if they're loaded automatically by other packages. E.g., amsfonts is loaded by amssymb, amsmath is loaded by mathtools, etc.

  • Some packages, and the hyperref package in particular, are loaded too early. An excellent rule of thumb is to load hyperref last. Do you really set pdftitle={My title}, pdfproducer={Producer}, etc? Put differently, why aren't you entering real information.

  • Code that's either redundant, superfluous, or plain bad. Since you employ the book document class, I can see no valid reason for executing \pagenumbering{roman} in the preamble. Instead, you should be executing \frontmatter immediately after \begin{document} and \mainmatter at, you guessed it, the start of the main part of the document. That will also spare you from having to type \pagenumbering{arabic} and \setcounter{page}{1}. I also don't understand the purpose of the multitude of \clearpage and \newpage instructions.

  • Code that's absolutely not needed. (I guess that would make it "super-redundant", right?) That's something I cannot judge fully since I have no knowledge of the contents of the document. I'd cycle through each package, one at a time: don't load a package and recompile the document twice. If the document compiles fine, that particular package wasn't needed.

If you manage to wade through all of these steps, your document will likely be a lot more streamlined too.

Mico
  • 506,678
  • 1
    I disagree with your fifth bullet: first load all packages, which makes easier to check du-lications or to move them around to avoid clashes; then dedicate a section of the preamble to settings specific to each package; then personal commands; finally, settings specific to the document that might be subject to changes at the last minute (double spacing, page style, and so on, such as settings to \clubpenalty). – egreg Mar 04 '21 at 08:22
  • I have made all changes you suggested except bullet 5,7 (which I do not understand what it means).. I do not understand "I also don't understand the purpose of the multitude of \clearpage and \newpage instructions." – Praphulla Koushik Mar 04 '21 at 08:35
  • 1
    @egreg -- I guess you're proposing a different approach to organizing the commands in the preamble -- load all packages first, then a sequence of commands that make use of the packages' capabilities, and so on. The main thing, then, is to apply some kind of grouping. Almost any approach to grouping must be better than the current situation... – Mico Mar 04 '21 at 08:53
  • @PraphullaKoushik - After %The style you want to use for references, there's \newpage, \clearpage, and \cleardoublepage; at least some of those instructions must be redundant. – Mico Mar 04 '21 at 08:55
0
\documentclass[11pt,twoside]{book}
\usepackage{a4wide}
\usepackage{fancyhdr}

\usepackage{float,subfigure,shadow,fancybox,appendix}
\usepackage{stmaryrd}
\usepackage[nottoc]{tocbibind}
\usepackage{makeidx}
\pagestyle{fancy} \makeindex %\authorindex

\renewcommand{\headrulewidth}{.1pt}
\fancyhead[LE,RO]{{\thepage}}
\fancyhead[RE]{\nouppercase{{\leftmark}}}
\fancyhead[LO]{\nouppercase{{\rightmark}}} \fancyfoot{}
\def\baselinestretch{1.1}
\date{\today}
\clubpenalty=10000 \widowpenalty=10000

\newcommand*\chancery{\fontfamily{pzc}\selectfont}
\usepackage{dcolumn}% Align table columns on decimal point
\usepackage{bm}% bold math
\usepackage{hyperref}
\usepackage{upgreek}
\usepackage[utf8]{inputenc}
\usepackage{mathrsfs}
\usepackage{alltt}
\usepackage{tikz-cd}
\usepackage{aliascnt}
\usepackage{tikz}
\usepackage{mathtools}
\usepackage{multicol}

\usepackage{relsize}


\usepackage{amssymb,amsthm,graphicx,amsxtra, setspace}

\usepackage{eso-pic}
\allowdisplaybreaks
\usepackage{scalerel,stackengine}
\stackMath
\newcommand\reallywidehat[1]{%
    \savestack{\tmpbox}{\stretchto{%
            \scaleto{%
                \scalerel*[\widthof{\ensuremath{#1}}]{\kern-.6pt\bigwedge\kern-.6pt}%
                {\rule[-\textheight/2]{1ex}{\textheight}}%WIDTH-LIMITED BIG WEDGE
            }{\textheight}%
        }{0.5ex}}%
    \stackon[1pt]{#1}{\tmpbox}%
}
\parskip 1ex

\theoremstyle{definition}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{example}[theorem]{Example}
\newtheorem{remark}[theorem]{Remark}


\renewcommand{\theequation}{\arabic{section}.\arabic{equation}}
\newcommand{\mainidx}[1]{{\it #1}}
\newcommand{\boldidx}[1]{{\bf #1}}

\DeclareMathOperator*{\esssup}{ess\,sup}
\DeclareMathOperator{\tr}{Tr}

\makeatletter
\newcommand{\doublewidetilde}[1]{{%
        \mathpalette\double@widetilde{#1}%
}}
\newcommand{\double@widetilde}[2]{%
    \sbox\z@{$\m@th#1\widetilde{#2}$}%
    \ht\z@=.9\ht\z@
    \widetilde{\box\z@}%
}
\makeatother


\newcommand{\mc}{\mathcal}
\newcommand{\mf}{\mathfrak}
\newcommand{\mb}{\mathbb}
\newcommand{\xra}{\xrightarrow}
\newcommand{\ra}{\rightarrow}
\newcommand{\rra}{\rightrightarrows}

\renewcommand{\d}{\/\mathrm{d}\/}
\renewcommand{\thefootnote}{\arabic{footnote}}


\def\listofsymbols{\input{symbols} \cleardoublepage}
\def\addsymbol #1: #2#3{$#1$ \> \parbox{5in}{#2 \dotfill \pageref{#3}}\\}
\def\newnot#1{\label{#1}}


\hypersetup{
    %bookmarks=true,         % show bookmarks bar?
    unicode=false,          % non-Latin characters in Acrobat�s bookmarks
    pdftoolbar=true,        % show Acrobat�s toolbar?
    pdfmenubar=true,        % show Acrobat�s menu?
    pdffitwindow=false,     % window fit to page when opened
    pdfstartview={FitH},    % fits the width of the page to the window
    pdftitle={My title},    % title
    pdfauthor={Author},     % author
    pdfsubject={Subject},   % subject of the document
    pdfcreator={Creator},   % creator of the document
    pdfproducer={Producer}, % producer of the document
    pdfkeywords={keywords}, % list of keywords
    pdfnewwindow=true,      % links in new window
    colorlinks=true,       % false: boxed links; true: colored links
    linkcolor=blue,          % color of internal links
    citecolor=blue,        % color of links to bibliography
    filecolor=magenta,      % color of file links
    urlcolor=green           % color of external links
}


\newcommand {\apgt} {\ {\raise-.5ex\hbox{$\buildrel>\over\sim$}}\ }
\newcommand {\aplt} {\ {\raise-.5ex\hbox{$\buildrel<\over\sim$}}\ }

\makeatletter
\def\myfnt{\ifx\protect\@typeset@protect\expandafter\footnote\else\expandafter\@gobble\fi}
\makeatother


\begin{document}
    \frontmatter
    \doublespace
    \include{Title} 
    \newpage
    \thispagestyle{empty} \cleardoublepage

    \setcounter{secnumdepth}{3} % organisational level that receives a numbers
    \tableofcontents
    \mainmatter
    \newpage
    \newpage
    \thispagestyle{empty} 
    \include{Preliminaries}
    \include{chapter2}
    \include{chapter3}
    \include{chapter4}
    \include{chapter5}
    \include{chapter6}


    %The style you want to use for references.
    \newpage
    \thispagestyle{plain}\chapter*{Publications arising out of the PhD
        thesis\hfill} \addcontentsline{toc}{chapter}{Publications arising
        out of the PhD thesis}
    \begin{enumerate}
        \item [{[1]}]  
    \end{enumerate}
    \clearpage
    \newpage
    \thispagestyle{empty}
    \bigskip{}
    \vspace{1cm} \cleardoublepage

    \bibliography{references}
    \bibliographystyle{plain}


    \singlespace
    \printindex %\printauthorindex
\end{document}

This is the code I end up with after doing what Mico suggested.

  • Umm, I thought I recommended not loading the subfigure package. If your document does contain sub-figures and -tables, do look into using either the subfig or the subcaption package. I would also defer loading the hyperref package until just before \hypersetup. – Mico Mar 04 '21 at 09:11