\documentclass[a4paper,11pt]{book}
\usepackage{supertabular}
\usepackage{amsthm,amssymb,amsmath}
\usepackage{amssymb,latexsym}
%\usepackage{times}

% بسته‌ای برای تنطیم حاشیه‌های بالا، پایین، چپ و راست صفحه
\usepackage[top=3cm, bottom=2.5cm, left=2cm, right=2cm]{geometry}
% بسته‌‌ای برای ظاهر شدن شکل‌ها و تصاویر متن
\usepackage{graphicx}
% بسته‌‌ای برای ایجاد دیاگرام‌های مختلف
%\usepackage[colorlinks]{hyperref}
\usepackage[all]{xypic}
% بسته‌ و دستوراتی برای ایجاد لینک‌های رنگی با امکان جهش
\usepackage{array}
\usepackage{rotating}
\usepackage{sidecap}
%\usepackage[pagebackref=true,colorlinks,linkcolor=blue,citecolor=magenta]{hyperref}
% چنانچه قصد پرینت گرفتن نوشته خود را دارید، خط بالا را غیرفعال و  از دستور زیر استفاده کنید چون در صورت استفاده از دستور زیر‌‌، 
% لینک‌ها به رنگ سیاه ظاهر خواهند شد که برای پرینت گرفتن، مناسب است
\usepackage[pagebackref=false]{hyperref}
% بسته‌ای برای ایجاد جعبه و کادر
\usepackage{fancybox}
% بسته‌ لازم برای تنظیم سربرگ‌ها
\usepackage{fancyhdr}
% بسته‌ای برای ظاهر شدن «مراجع» و «نمایه» در فهرست مطالب
\usepackage{tocbibind}
%\renewcommand{\thefootnote}
% دستورات مربوط به ایجاد نمایه

\usepackage{makeidx}
\makeindex
%\usepackage[extrafootnotefeatures]{xepersian}
%\twocolumnfootnotes


%%%%%%%%%%%%%%%%%%%%%%%
% فراخوانی بسته زی‌پرشین و تعریف قلم فارسی و انگلیسی
\usepackage{xepersian}
\settextfont[Scale=1.2]{B Nazanin}
\setdigitfont[Scale=1.2]{XB Niloofar}
% از revision 118 زی‌پرشین به بعد، وارد کردن دستور زیر لازم نیست. توجه داشته باشید که در صورت  غیرفعال کردن این دستور،
% از فونت پیش‌فرض لاتک برای کلمات انگلیسی استفاده خواهد شد.
\setlatintextfont[ExternalLocation,BoldFont={lmroman10-bold},BoldItalicFont={lmroman10-bolditalic},ItalicFont={lmroman10-italic}]{lmroman10-regular}
% چنانچه می‌خواهید اعداد در فرمول‌ها، فارسی باشد، خط زیر را نیز فعال کنید
%\setdigitfont[Scale=1.1]{XB Zar}
%%%%%%%%%%%%%%%%%%%%%%%
% تعریف قلم‌های فارسی و انگلیسی اضافی برای استفاده در بعضی از قسمت‌های متن
\defpersianfont\nastaliq[Scale=2]{IranNastaliq}

\defpersianfont\titr[Scale=1]{XB Titre}
%\defpersianfont\traffic[Scale=1]{B Traffic}
% چنانچه فونت B Traffic را ندارید، دستور بالا را غیرفعال کرده و دستور زیر را فعال کنید
\defpersianfont\traffic[Scale=1]{XB Niloofar}
% دستوری برای حذف کلمه «چکیده»
\renewcommand{\abstractname}{}
% دستوری برای حذف کلمه «abstract»
\renewcommand{\latinabstract}{}
% دستوری برای تغییر نام کلمه «اثبات» به «برهان»
\renewcommand\proofname{\textbf{برهان}}
% دستوری برای تغییر نام کلمه «کتاب‌نامه» به «مراجع»
\renewcommand{\bibname}{مراجع}
 %دستوری برای تعریف واژه‌نامه فارسی به انگلیسی
\newcommand\englishgloss[2]{#2\dotfill\lr{#1}\\}
%دستوری برای تعریف واژه‌نامه انگلیسی به فارسی

%%%%%%%%%%%%%%%%%%%%%%%
% تعریف و نحوه ظاهر شدن عنوان قضیه‌ها، تعریف‌ها، مثال‌ها و ...
\theoremstyle{definition}
\newtheorem{definition}{تعریف}[section]
\theoremstyle{theorem}
\newtheorem{theorem}[definition]{قضیه}
\newtheorem{lemma}[definition]{لم}
\newtheorem{proposition}[definition]{گزاره}
\newtheorem{corollary}[definition]{نتیجه}
\newtheorem{remark}[definition]{ملاحظه}
\newtheorem{example}[definition]{مثال}
%%%%%%%%%%%%%%%%%%%%%%%
% تعریف دستورات جدید برای خلاصه نویسی و راحتی کار در هنگام تایپ فرمول‌های ریاضی
\newcommand{\bR}{\mathbb{R}}
\newcommand{\bF}{\mathcal{F}}
\newcommand{\NP}{N_S ^ P (s)}
\newcommand{\PR}{proj_S (x)}
\newcommand{\RP}{\partial _P f(x)}
\newcommand{\NM}{N_{epi f} ^ P \big(x , f(x) \big)}
\newcommand{\no}{\nonumber}
\newcommand{\Pa}{\partial_{P} f_{\alpha}(x)}
\newcommand{\fa}{f_{\alpha}(x)}
\newcommand{\faa}{f_{\alpha}}
\newcommand{\es}{\varepsilon}
\newcommand{\nm}{\Vert}
\newcommand{\rd}{\partial_P d_S(x)}
\newcommand{\ds}{d_S}
\newcommand{\dt}{d_S^2}
\newcommand{\Dp}{d'_S(x)}
\newcommand{\rp}{\partial_P}
\newcommand{\xb}{\bar{x}}
\newcommand{\po}{\mathcal{P}}


% دستورهایی برای سفارشی کردن سربرگ صفحات

%\pagestyle{fancy}
%\cfoot{}
%\lhead{\thepage}

\documentclass{book}
\usepackage{fancyhdr}
\pagestyle{fancy}
\renewcommand{\chaptermark}[1]{%
\markboth{#1}{}}
\renewcommand{\sectionmark}[1]{%
\markright{\thesection\ #1}}
\fancyhf{} % delete current header and footer
\fancyhead[LO,RE]{\thepage}
\fancyhead[LE]{\leftmark}
\fancyhead[RO]{\rightmark}
\renewcommand{\headrulewidth}{0.5pt}
\renewcommand{\footrulewidth}{0pt}
\addtolength{\headheight}{0.5pt} % space for the rule LO
\fancypagestyle{plain}{%
\fancyhead{} % get rid of headers on plain pages
\renewcommand{\headrulewidth}{0pt} % and the line
}

% with this we ensure that the chapter and section
% headings are in lowercase.



\documentclass{article}
\usepackage{xepersian}
%\settextfont{Yas}
\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
%%%%%%%%%%%%%%%%%%%%%%%

% دستورهایی برای ایجاد کادر (جعبه)
\newenvironment{fminipage}%
{\begin{Sbox}\begin{minipage}}%
{\end{minipage}\end{Sbox}\fbox{\TheSbox}}
%%%%%%%%%%%%%%%%%%%%%%%
\linespread{1.1}
\begin{document}
\input{title}
\input{title1}
\include{preface}
\include{symbol}
\include{chapter1} 
\include{chapter2}
\include{chapter3}
\include{chapter4}
\include{chapter5}
\include{chapter6}
\include{chapter7}
\include{chapter8}
\include{chapter9}
\include{chapter10}
\include{appendix}
\include{glossary}
\include{reference}
\end{document}