\documentclass[a4paper,14pt]{report}
\renewcommand{\baselinestretch}{1.5}
\usepackage{amsthm,amssymb,amsmath}
\usepackage[latin1]{inputenc}
\usepackage{empheq,fancybox}
\usepackage{amsfonts}
\usepackage{textcomp}
\usepackage{tocbibind}
\usepackage{caption}
\usepackage{array}
\usepackage{longtable}
%\usepackage[pagebackref=false]{hyperref} % PDF links
\usepackage{graphicx} % inserting images
%\usepackage{hyperref} % PDF links
\usepackage{setspace} % for switching between double/single space in document
\usepackage{fancyhdr} % package for changing Headings style
% setting the margins of page
\usepackage[top=2.2cm,right=3cm,bottom=2.4cm,left=2cm]{geometry}                 
\usepackage{verbatim}
\usepackage{pdfpages}
%\usepackage{amsmath,amssymb,graphicx}
%\usepackage{amsmath}
%\usepackage{amssymb}
\usepackage{mathtools}
\usepackage{multirow}
\usepackage{perpage}
\MakePerPage{footnote}

%\usepackage[usenames]{xcolor}
%\definecolor{arash}{rgb}{1,0.2,0.8}
%\usepackage[colorlinks,linkcolor=arash,citecolor=green,bookmarks]{hyperref}

\usepackage{subfigure}
%\usepackage[colorlinks]{hyperref}
%\hypersetup{pdfauthor=jamshidi}

\usepackage{titlesec}
\setcounter{secnumdepth}{5}
\setcounter{tocdepth}{5}

\usepackage{titletoc}
\usepackage[labelfont={bf,small}]{caption}
\usepackage[demo]{graphicx}
\usepackage[labelsep=space]{caption}
\usepackage{xepersian}
\DefaultMathsDigits

\titlecontents{section}%
[1.4em]%
{}%
{\contentslabel{1.4em}}%
{\hspace*{-2.3em}}%
{\titlerule*[0.8pc]{.}\contentspage}‎‎

\titlecontents{subsection}%
[4.0em]%
{}%
{\contentslabel{2.7em}}%
{\hspace*{-2.3em}}%
{\titlerule*[0.8pc]{.}\contentspage}‎‎
‎
\titlecontents{subsubsection}%
[7.0em]%
{}%
{\contentslabel{2.7em}}%
{\hspace*{-2.3em}}%
{\titlerule*[0.8pc]{.}\contentspage}‎‎

\titlecontents{paragraph}%
[10.0em]%
{}%
{\contentslabel{3.7em}}%
{\hspace*{-2.3em}}%
{\titlerule*[0.8pc]{.}\contentspage}‎‎

\titlecontents{subparagraph}%
[12.0em]%
{}%
{\contentslabel{4.3em}}%
{\hspace*{-2.3em}}%
{\titlerule*[0.8pc]{.}\contentspage}‎‎
%-------------------------------------------------------------------------
% tell tex engine address of folder containing your pictures
\graphicspath{{images/}}

% commands to print the page number in header
\pagestyle{fancy} 
%\cfoot{\verb|https://sites.google.com/site/Jamshidih/}

%\cfoot{\verb|$\text{http://iasbs.ac.ir/}  \thicksim \text{ShirinJamshidi/}$ }
\cfoot{} 
\lhead{\thepage}
%\lhead{\site}

%{\site}{ \verb|$\text{http://iasbs.ac.ir/}  \thicksim \text{shirinJamshidi/}$}

\usepackage{lastpage}
% بسته‌‌ای برای ایجاد دیاگرام‌های مختلف
\usepackage[all]{xy}
%------------------------------------------------------------------------------------------
% دستورهایی برای سفارشی کردن سربرگ صفحات
%\csname@twosidetrue\endcsname
%\pagestyle{fancy}
%\fancyhf{} 
%\fancyhead[OL,EL]{\thepage}
%\fancyhead[OR]{\small\rightmark}
%\fancyhead[ER]{\small\leftmark}
%\renewcommand{\chaptermark}[1]{%
%\markboth{\thechapter.\ #1}{}}
%-----------------------------------------------------------------------------------------
% دستورهایی برای سفارشی کردن صفحات اول فصل‌ها
\makeatletter
\newcommand\mycustomraggedright{%
 \if@RTL\raggedleft%
 \else\raggedright%
 \fi}
\def\@part[#1]#2{%
\ifnum \c@secnumdepth >-2\relax
\refstepcounter{part}%
\addcontentsline{toc}{part}{\thepart\hspace{1em}#1}%
\else
\addcontentsline{toc}{part}{#1}%
\fi
\markboth{}{}%
{\centering
\interlinepenalty \@M
\ifnum \c@secnumdepth >-2\relax
 \huge\bfseries \partname\nobreakspace\thepart
\par
\vskip 20\p@
\fi
\Huge\bfseries #2\par}%
\@endpart}
\def\@makechapterhead#1{%
\vspace*{-30\p@}%
{\parindent \z@ \mycustomraggedright %\@mycustomfont
\ifnum \c@secnumdepth >\m@ne
\if@mainmatter

\huge\bfseries \@chapapp\space {\chapternumber\thechapter}
\par\nobreak
\vskip 20\p@
\fi
\fi
\interlinepenalty\@M 
\Huge \bfseries #1\par\nobreak
\vskip 120\p@
}}
\makeatother

% commands related to XePersian package
\settextfont[Scale=1.5]{B Nazanin}
\setlatintextfont[Scale=1.2]{Times New Roman}

% -------------------------------------
%\input{cover_info}
\begin{document}
\pagestyle{empty}
\baselineskip=1.1cm
%\include{besm}
%\include{cover_fa}
%\include{declaration_fa}
%\include{dedication}
%\include{acknowledgement}
%\include{abstract_fa}
%\include{abbreviation}
%\include{phrases}

\pagenumbering{harfi}
\tableofcontents
\listoffigures
\listoftables
%\listoffootnote

% insert each of your chapters with a \inlcude{filename} command as below
\newpage
\pagestyle{fancy}
\baselineskip=1.2cm
\include{chapter1}
%\include{chapter2}
%\include{chapter3}
%\include{chapter4}
%\include{software}
%\include{aminacid}
% -----------------------------------------------------------------------

% If do not have appendix then comment following 3 lines
\appendix
%\include{peyvast1}
%\include{peyvast2}
% -------------------------------------------------------

%\singlespacing
%\include{references}
%\include{sooratjalase}
%\include{abstract_en}
%\baselineskip=1.1cm
%\include{declaration_en}
%\include{cover_en}

%\parindent=1.0cm

\end{document}
