\documentclass[a4paper,12pt]{report}
\usepackage{graphicx} % inserting images
\usepackage{hyperref} % PDF links

%pachage to use underline command \uline{}
\usepackage[normalem]{ulem}

\usepackage{enumitem} %to use alphabet item
\usepackage{setspace} % for switching between double/single space in document
%\usepackage{fancyhdr} % package for changing Headings style

%change caption label style
\usepackage{caption}
\DeclareCaptionLabelFormat{parens}{#1(#2)} %insert label num in parens
\captionsetup[figure]{labelformat=parens}
%end change of cation label style

% setting the margins of page
\usepackage{fontspec} %to define and use fonts
\usepackage{titlesec} % to use \titleformat
\usepackage[top=3cm,right=3cm,bottom=3cm,left=2cm]{geometry} 

%package to reset footnote num in xepersian
\usepackage{zref-perpage}
\zmakeperpage{footnote}
               
\usepackage{xepersian}

\SepMark{-} %change dot to dash



\defpersianfont\HMXNiloofar[Scale=1.192,ExternalLocation,%
  BoldFont={HM_XNiloofarBd},%
  ItalicFont={HM_XNiloofarIt},%
  BoldItalicFont={HM_XNiloofarBdIt},%
  SlantedFont={HM_XNiloofarOb},%
  BoldSlantedFont={HM_XNiloofarObBd}%
  ]{HM_XNiloofar}
  
  
\defpersianfont\HMXTitr[Scale=1.192,ExternalLocation,%
  ItalicFont={HM_XTitrIt},%
  SlantedFont={HM_XTitrOb},%
  ]{HM_XTitr}

\renewcommand{\abstractname}{}
% دستوری برای حذف کلمه «abstract»
%\renewcommand{\latinabstract}{}
% دستوری برای تغییر نام کلمه «اثبات» به «برهان»
\renewcommand\proofname{\textbf{برهان}}
% دستوری برای تغییر نام کلمه «کتاب‌نامه» به «مراجع»
\renewcommand{\bibname}{منابع}

%\renewcommand{\theequation}{\thechapter-\arabic{equation}}
\def\listalgorithmname{فهرست الگوریتم‌ها}
\def\listfigurename{فهرست تصاویر}
\def\listtablename{فهرست جداول}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% tell tex engine address of folder containing your pictures
\graphicspath{{images/}}

% commands related to XePersian package
\settextfont[Scale=1.1]{HMXNiloofar}
\setdigitfont{HMXNiloofar}
\setlatintextfont{Times New Roman}

%to add chapter phrase befor chpter number and make all number to alpha num
\makeatletter
\def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne
                       \if@mainmatter
                         \refstepcounter{chapter}%
                         \typeout{\@chapapp\space\thechapter.}%
                         \addcontentsline{toc}{chapter}%
                                   {\@chapapp~\protect\numberline{\tartibi{chapter}}\quad #1}%
                       \else
                         \addcontentsline{toc}{chapter}{#1}%
                       \fi
                    \else
                      \addcontentsline{toc}{chapter}{#1}%
                    \fi
                    \chaptermark{#1}%
                    \addtocontents{lof}{\protect\addvspace{10\p@}}%
                    \addtocontents{lot}{\protect\addvspace{10\p@}}%
                    \if@twocolumn
                      \@topnewpage[\@makechapterhead{#2}]%
                    \else
                      \@makechapterhead{#2}%
                      \@afterheading
                    \fi}
\renewcommand*\l@section{\@dottedtocline{1}{4.5em}{2.3em}}
\renewcommand*\l@subsection{\@dottedtocline{2}{6.5em}{3.2em}} 
\makeatother

%chapter title format change font and number to alpha number
\titleformat{\chapter}[display]
{\vspace{1cm}\normalfont\huge\filcenter\HMXTitr}{\renewcommand{\thechapter}{\tartibi{chapter}}
\chaptertitlename\ \thechapter}{20pt}{\Huge}
% -------------------------------------
\makeatletter
\renewcommand*\l@chapter[2]{%
  \ifnum \c@tocdepth >\m@ne
    \addpenalty{-\@highpenalty}%
    \vskip 1.0em \@plus\p@
    \setlength\@tempdima{1.5em}%
    \begingroup
      \parindent \z@ \if@RTL\leftskip\else\rightskip\fi \@pnumwidth
      \parfillskip -\@pnumwidth
      \leavevmode \bfseries
      \advance\if@RTL\rightskip\else\leftskip\fi\@tempdima
      \hskip -\if@RTL\rightskip\else\leftskip\fi
      #1\nobreak\leaders\hbox{$\m@th
        \mkern \@dotsep mu\hbox{.}\mkern \@dotsep
        mu$}\hfill \nobreak\hb@xt@\@pnumwidth{\hss #2}\par
      \penalty\@highpenalty
    \endgroup
  \fi}
  
\renewcommand\tableofcontents{%
    \if@twocolumn
      \@restonecoltrue\onecolumn
    \else
      \@restonecolfalse
    \fi
    \centerline{\huge\bfseries\contentsname
        \@mkboth{%
           \MakeUppercase\contentsname}{\MakeUppercase\contentsname}}%
    \vskip 40\p@
    \@starttoc{toc}%
    \if@restonecol\twocolumn\fi
    }
    
    \renewcommand{\@starttoc}[1]{%
  \hboxR to \textwidth{\uline{عنوان} \hfill \uline{صفحه}} 
  \begingroup
    \makeatletter
    \@input{\jobname.#1}%
    \if@filesw
      \expandafter\newwrite\csname tf@#1\endcsname
      \immediate\openout \csname tf@#1\endcsname \jobname.#1\relax
    \fi
    \@nobreakfalse
  \endgroup}
  
\makeatother

%make en footnote number en
\makeatletter
\def\@makeLTRfnmark{\hbox{\@textsuperscript{\latinfont\@thefnmark}}}
\renewcommand\@makefntext[1]{%
    \parindent 1em%
    \noindent
    \hb@xt@1.8em{\hss\if@RTL\@makefnmark\else\@makeLTRfnmark\fi}#1}
\makeatother
%end of change en footnote number


\input{jeld_info}

\begin{document}

\include{cover_fa}

\newpage

\include{inTheNameOfGod}
\include{cover_fa}
\include{taeid}

\pagenumbering{harfi}
\tableofcontents
\listoftables
\listoffigures

\include{abstract_fa}

% insert each of your chapters with a \inlcude{filename} command as below
\doublespacing
\include{chap1}
\include{chap2}
\include{chap3}
\include{chap4}
% -----------------------------------------------------------------------

\singlespacing
\include{references}

% If do not have appendix then comment following 3 lines
\doublespacing



\appendix %change page number to alpha

\include{peyvast1}
\include{peyvast2}
% -------------------------------------------------------

\singlespacing
\include{abstract_en}
\include{cover_en}

\newpage

\end{document}