I am using the following thesis template to write my thesis.
\documentclass[11pt, a4paper, twoside]{book}
\usepackage{graphicx}
%\usepackage{a4wide}% obsolete: geometry does a better job
\usepackage{fancyhdr}
%\usepackage{pdfpages}
%\usepackage[dvips]{epsfig} obsolete: graphicx does the job
\usepackage{palatino,float,multicol,fancybox,amsfonts,appendix,amsthm}%shadow
%subfigure is deprecated. Use subcaption instead
%\usepackage{chapterbib}
\usepackage{amssymb}
\usepackage{stmaryrd}
\usepackage{mathrsfs}
\usepackage[nottoc]{tocbibind}
\usepackage{makeidx}
\usepackage{relsize}
%\usepackage[emindex]{apacite}
%\usepackage{authorindex}
%\usepackage{multicol}
\pagestyle{fancy} \makeindex %\authorindex
\renewcommand{\headrulewidth}{.1pt}
%\renewcommand{\topmargin}{0.01cm}
\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{graphics} useless: graphicx is loaded
\usepackage{xcolor}
\usepackage{upgreek}
%\usepackage[utf8]{inputenc} useless. utf8 is the default nowadays, unless otherwise specified
\usepackage{alltt}
\usepackage{tikz-cd}
\usepackage{aliascnt}
\usepackage{tikz}
\usepackage{mathtools}
\usepackage{multicol}
\usepackage{charter}
\usepackage{relsize}
\usepackage{amssymb,amsthm,graphicx,amsxtra, setspace}
\usepackage{graphicx, 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
\usepackage{hyperref}
%\allowdisplaybreaks
% THEOREM Environments ---------------------------------------------------
%\setlength{\textheight}{19.5 cm} \setlength{\textwidth}{12.5 cm}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{assumption}[theorem]{Assumption}
\newtheorem{corollary}[theorem]{Corollary}
\theoremstyle{definition}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{example}[theorem]{Example}
\theoremstyle{remark}
\newtheorem{remark}[theorem]{Remark}
\newtheorem{hypothesis}[theorem]{Hypothesis}
\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}}
% ----------------------------------------------------------------
% Macro for 'List of Symbols', 'List of Notations' etc...
\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}
%\maketitle
%\tableofcontents
%\listoffigures
%\newpage
\doublespace\include{Title} \pagenumbering{arabic}
\setcounter{page}1
\newpage
\thispagestyle{empty} \cleardoublepage
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%TOC
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\setcounter{secnumdepth}{3} % organisational level that receives a numbers
%\setcounter{tocdepth}{3} % print table of contents for level 3
\tableofcontents
% levels are: 0 - chapter, 1 - section, 2 - subsection, 3 - subsection
%-----------------------------------------------------------------------------------
%\listoffigures %\listoftables
\newpage
%\doublespace\chapter*{List of Symbols\hfill} \markboth{List of
%Symbols}{List of Symbols} \addcontentsline{toc}{chapter}{List of
%Symbols} \listofsymbols \cleardoublepage
%-----------------------------------------------------------------------------------
%\addcontentsline{toc}{chapter}{\numberline{}\listoffigures,\listoftables}
%------------------------------------------------------------------------------
\newpage
\thispagestyle{empty} \doublespace
\include{Preliminaries}
\include{chapter2}
\include{chapter3}
\include{chapter4}
\include{chapter5}
\include{chapter6}
%\include{chapter6a}
%\include{chapter6b}
%\include{chaptercon}
%\begin{appendices}
%\input{AppendixA}
%\input{AppendixB}
%\end{appendices}
%\def\Appendix{\input{Appendix_1} \cleardoublepage}
%\chapter*{Appendix\hfill} \markboth{Appendix}{Appendix} \addcontentsline{toc}{chapter}{Appendix}
%\Appendix \cleardoublepage
%\include{Appendix_1}
%\include{bibit}
%The style you want to use for references.
%\bibliography{mr,refs}
\newpage
\thispagestyle{plain}\chapter*{Publications arising out of the PhD thesis\hfill} \addcontentsline{toc}{chapter}{Publications arising
out of the PhD thesis}
%\begin{center}\textbf{\Large Publications arising out of the PhD thesis}\end{center}{\huge \par}
%\bigskip{}
\begin{enumerate}
\item [{[1]}] qq
\end{enumerate}
\clearpage
\newpage
\thispagestyle{empty}
\bigskip{}
\vspace{1cm} \cleardoublepage
%\printindex %Make an index AUTOMATICALLY
\bibliography{references}
\bibliographystyle{plain}
\singlespace
\printindex %\printauthorindex
\end{document}
When I write definition or remark, the font is showing as italics.
How can I change this?
As a side question, are there any commands in above template that are not necessary? I do not know much about technicalities, I only know how to write in latex. So, I copied the template from some one. Please let me know if any of them are unnecessary or if this template can be made any better.
Please see the attached photo for error after using the template mentioned by Bernard.


amsmathwhen you loadmathtools(which is a superset of amsmath). Some packages are loaded twice. Last,hyperrefshould be loaded as the last package, with very few exceptions. – Bernard Mar 01 '21 at 14:23amsthmpackage. This should answer your question: Non italic text in theorems, definitions, examples – barbara beeton Mar 03 '21 at 22:04\dis already defined (it is an accent) and really shouldn't be redefined. – barbara beeton Mar 03 '21 at 22:20