 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                          بـسـم‌الـلـه‌الـرحـمـن‌الـرحـیـم                                                
%                                          الـحـمـدلـلـه‌رب الـ‍‌عـ‍‌الـمـیـن                                                 
%                                               الـرحـمـن‌الـرحـیـم                                                        
%                                                 مـلـک یـوم‌الـدیـن                                                       
%                                         ایاک نـ‍‌عـبـد و ایاک نـسـتـ‍‌عـیـن                                                 
%                                           اهـدناالصـراط المـسـتـقـیـم                                                   
%                                         صـراط‌الـذیـن انـ‍‌عـمـت عـلـیـ‍‌هـم                                                
%                                           غـیـرالـمـ‍‌غـضـوب عـلـیـ‍‌هـم                                                    
%                                                  ولاالـضالـیـن                                                           
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% توجه داشته باشید برای دیدن خروجی کامل شامل نمایه و فهرست مطالب در ویرایشگر Texmaker، ابتدا دو بار 
% کلید F1 و سپس از منوی Tools گزینه MakeIndex و یا بطور معادل دکمه F12 روی صفحه کلیدتان را بزنید و دوباره کلید F1 و در آخر کلید F7 را فشار دهید.
%توضیحات مربوط به هر بسته یا دستور را می‌توانید در خط بالای آن ببینید.

\documentclass[fleqn,12pt]{book}%openany
\usepackage{perpage}
\MakePerPage{footnote}
\usepackage{graphicx}
\usepackage{amsthm}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{amsfonts}


\usepackage{mathrsfs}
\usepackage{fancybox}
\usepackage{fancyhdr}
\usepackage[all]{xy}
\usepackage{setspace}
\usepackage{makeidx}
\makeindex
\usepackage{lscape}
\usepackage{array}
\RequirePackage{hyperref}
%\hypersetup{colorlinks=true,linkcolor=red,citecolor=green,
%filecolor=magneta,urlcolor=cyan}
\usepackage{xepersian}
\settextfont[Scale=1.1]{B Lotus}
\setdigitfont[Scale=1]{XB Niloofar}
\setlatintextfont[Scale=1]{Times New Roman}
%\defpersianfont\Nastaliq[Scale=1]{IranNastaliq}
%\defpersianfont\Titre[Scale=1]{XB Titre} 
%\settextfont[ItalicFont={Yas}]{Yas}
%\setlatintextfont[ExternalLocation,BoldFont={lmroman10-bold},BoldItalicFont={lmroman10-bolditalic},ItalicFont={lmroman10-italic}]{lmroman10-regular}
%here comes fancy definitions%%%%%%%%%%%%%%
%\pagestyle{fancy}
% with this we ensure that the chapter and section
% headings are in lowercase.


\renewcommand{\chaptermark}[1]{%
        \markboth{#1}{}}
\renewcommand{\sectionmark}[1]{%
        \markright{\thesection\ #1}}
       


%\fancyhf{} % delete current header and footer
%\fancyhead[RO]{\slshape\leftmark}
%\fancyhead[LE]{\slshape\rightmark}
%\fancyhead[LO,RE]{\slshape \thepage}
%\renewcommand{\headrulewidth}{0.4pt}

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

\renewcommand{\contentsname}{\centerline{فهرست مطالب }}
%\renewcommand{\listfigurename}{\centerline{فهرست شکل‌ها}}
%\renewcommand{\listtablename}{\centerline{   فهرست جدول‌ها }}
\renewcommand{\bibname}{{فهرست مراجع }}  
%%%%%%%%%%%%%%%%%%%
%\textheight=23cm%تنظیم طول متن   
%\textwidth=16cm%تنظیم عرض متن 
%\topmargin=-2.5cm%تنظیم حاشیه بالای صفحه 
%\oddsidemargin=2.5cm%تنظیم حاشیه سمت چپ صفحه  
%\headsep=1cm%     فاصله متن از سر برگ   
%\footskip=1cm% فاصله شماره صفحه از انتهای متن 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\makeatletter
\renewcommand{\@makefntext}[1]{\parindent 1em
   \noindent\hbox to 1em{}% if you want to indent footnote text you can change the width of the hbox (e.g. \hbox to 2em{})
   \llap{\if@RTL\else\latinfont\fi\@thefnmark -\,\,}#1}
\makeatother
%برای تغییر در حالت پاورقی که بعدش خط تیره بیاید.
%%%%%%%%%%%%%%%%%%%%%%%
%برای تغییر آ به الف در شمارنده‌ی ابجد 
\makeatletter
\def\@abjad#1{\ifcase#1\or الف \or ب\or ج\or د\or ه‌\or
و\or ز\or ح\or ط\or ی\or ک\or ل\or م\or ن\or \else\@ctrerr\fi}
\makeatother
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%
%برای وسط چین شدن عنوان فصل ها
%\makeatletter\def\@makechapterhead#1{\vspace*{50\p@}{\parindent \z@ \centering \normalfont
  %  \ifnum \c@secnumdepth >\m@ne\huge\bfseries \@chapapp\space \thechapter\par\nobreak
      %  \vskip 20\p@\fi \interlinepenalty\@M\Huge \bfseries #1\par\nobreak\vskip 40\p@}}\makeatother
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% تغییر در فهرست مطالب
\makeatletter\renewcommand{\@starttoc}[1]{  \hboxR to \textwidth{عنوان \hfill صفحه}  \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
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%......................................................................................................................... 
 %%%%% یا عــلــــــی  مـدد  یا عــلــــــی  مـدد  یا عــلــــــی  مـدد  یا عــلــــــی  مـدد    
\begin{document}


%\thispagestyle{empty}

% \begin{figure}[ht] \centerline{\includegraphics[width=20cm]{besm}} \end{figure}
%\newpage \begin{figure}[t]\vspace*{-2.5cm}\centerline{\includegraphics[width=20cm]{a}} \end{figure}
 %\newpage
%\begin{figure}[!t] \vspace*{-1cm}\centerline{\includegraphics[width=.01cm]{b}} \end{figure}
% \newpage
 %\begin{figure}[t]\centerline{\includegraphics[width=1cm]{c}} \end{figure}
%\newpage
%---------------------- Make title page ---------------------%
%\footskip=1cm% فاصله شماره صفحه از انتهای متن 
%\pagestyle{plain}
%\baselineskip=1cm
%\pagenumbering{abjad} 

 %\begin{figure}[ht]\vspace*{-2.5cm}\centerline{\includegraphics[width=20cm]{it}} \end{figure}

 %\begin{figure}[ht]\vspace*{-2.5cm}\centerline{\includegraphics[width=20cm]{m}} %\end{figure}

% \begin{figure}[ht]\vspace*{-2.5cm}\centerline{\includegraphics[width=20cm]{besm}} %\end{figure}
 \include{title}
\pagestyle{empty}
% \begin{figure}[ht]\vspace*{-2.5cm}\centerline{\includegraphics[width=20cm]{a}} \end{figure} 
% \include{form}
 %\include{tahod}
 % \include{taghdim}
  % \include{sepas} 
 % \begin{figure}[ht]\vspace*{-2.5cm}\centerline{\includegraphics[width=20cm]{tahod}} \end{figure}   
  % \begin{figure}[ht] \vspace*{-2.5cm}\centerline{\includegraphics[width=20cm]{test}} \end{figure}
%\include{abstract}
%\newpage
%\baselineskip=.85cm
%\include{shenase}
%\include{nasher}
%\include{blank}

\footskip= 10cm% فاصله شماره صفحه از انتهای متن 
%\setcounter{tocdepth}{3}
\tableofcontents
%\footskip= 1cm% فاصله شماره صفحه از انتهای متن 
%---------------------- List of figures ---------------------%


%--------------------- Set line spacing ---------------------%
%---------------------------- مقدمه ------------------------------- 


%\pagestyle{headings}
\baselineskip =.8cm
%\pagenumbering{arabic}


%------------------------- Chapter 1 ------------------------%
%\baselineskip=1.1cm
%\include{fasle1}
%------------------------- Chapter 2 ------------------------%
%\include{fasle2}
%\include{pish}
\setcounter{page}{1}
\include{moghadame}
\include{pish}
\include{box}
 \include{box3}
%  
%\include{moghadame}
%------------------------- Chapter 3 ------------------------%
\include{fasle1}
%------------------------- Chapter 3-3 ------------------------%
%\include{fasle2}
%------------------------- Chapter 4 ------------------------%

%------------------------- Chapter 5 ------------------------%
% 
%\include{fasle4}

%\include{fasle6}
%\include{fasle5}
%------------------------- Chapter 6 ------------------------%
 
%\include{fasle9}
%\include{fasle7}
%\include{fasle10}
%\include{refrence}

 %پیوست‌ها: این دستور سبب می‌گردد که فایل‌های بعد از آن به صورت پیوست  در فهرست مندرجات ظاهر گردد.
%------------------------- Chapter 7 ------------------------%
%\include{fasle11}
%\include{atlas}

%------------------------- مراجع -\listoffigures
%\addcontentsline{toc}{chapter}{   فهرست شکل‌ها }
%\listoftables
%\addcontentsline{toc}{chapter}{   فهرست جدول‌ها }
%\baselineskip=.8cm
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\include{refrence}%
%\baselineskip=1cm
%\include{enabstract}


%\thispagestyle{empty}
% \begin{figure}[ht]\vspace*{-1cm}\centerline{\includegraphics[width=20cm]{en}} \end{figure}
%--------------------- End of document ----------------------% 
\end{document}











