% در این فایل، دستورها و تنظیم‌های مورد نیاز، آورده شده است.
%-------------------------------------------------------------------------------------------------------------------
\usepackage{url}
\usepackage{longtable}
\usepackage{epic,eepic,ecltree}
\usepackage{xytree}
% در ورژن جدید زی‌پرشین برای تایپ متن‌های ریاضی، این سه بسته، حتماً باید فراخوانی شود
\usepackage{amsthm,amssymb,amsmath}
% بسته‌ای برای تنطیم حاشیه‌های بالا، پایین، چپ و راست صفحه
\usepackage[top=35mm, bottom=35mm, left=32mm, right=32mm]{geometry}
%\usepackage[\evensidemargin=4cm,\oddsidemargin‬=20cm]{geometry}

%\textheight=23cm%تنظیم طول متن   
%\textwidth=15cm%تنظیم عرض متن 
%\topmargin=-.5cm%تنظیم حاشیه بالای صفحه 
%\oddsidemargin=.2cm%تنظیم حاشیه سمت چپ صفحه  
%\headsep=1cm%     فاصله متن از سر برگ   
\footskip=2cm% فاصله شماره صفحه از انتهای متن

% بسته‌‌ای برای ظاهر شدن شکل‌ها و تصاویر متن
\usepackage{graphicx}
\usepackage{subfigure }
% بسته‌‌ای برای چاپ شدن خودکار تعداد صفحات در صفحه «معرفی پایان‌نامه»
\usepackage{lastpage}
% بسته‌‌ای برای ایجاد دیاگرام‌های مختلف
\usepackage[all]{xy}
% بسته‌ و دستوراتی برای ایجاد لینک‌های رنگی با امکان جهش
%\usepackage[pagebackref=false,colorlinks,linkcolor=blue,citecolor=magenta]{hyperref}
% چنانچه قصد پرینت گرفتن نوشته خود را دارید، خط بالا را غیرفعال و  از دستور زیر استفاده کنید چون در صورت استفاده از دستور زیر‌‌، 
% لینک‌ها به رنگ سیاه ظاهر خواهند شد که برای پرینت گرفتن، مناسب‌تر است
\usepackage[pagebackref=false]{hyperref}
% بسته‌ای برای ایجاد جعبه و کادر
\usepackage{fancybox}
% بسته‌ لازم برای تنظیم سربرگ‌ها
 \usepackage{fancyhdr}
% بسته‌ای برای ظاهر شدن «مراجع» و «نمایه» در فهرست مطالب
\usepackage{tocbibind}

\usepackage{colordvi}
\usepackage{color}
\definecolor{blue3}{rgb}{.2,.3,.6}
\definecolor{blue}{rgb}{.9,.0,.0}
\def\baselinestretch{2}
% دستورات مربوط به ایجاد نمایه

\usepackage{makeidx}
\makeindex
%%%%%%%%%%%%%%%%%%%%%%%%%%
% فراخوانی بسته زی‌پرشین و تعریف قلم فارسی و انگلیسی
\usepackage{xepersian}
%\input{C:/Documents and Settings/vahid/Desktop/New Folder/sourceFteX886EA178-B648-4840-A21A-AFFADE5AD3E5.ftx_farsitex_cmds_xepersian.tex}
%\settextfont[Scale=1.1]{XB Niloofar}
% \settextfont[Scale=1.1]{XB Niloofar}
 %\settextfont[Scale=1.1]{B Badr}
 \settextfont[Scale=1.4]{B Lotus}
% از 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\solution{\textbf{حل.}}
% دستوری برای تغییر نام کلمه «کتاب‌نامه» به «مراجع»
\renewcommand{\bibname}{مراجع}
% دستوری برای تعریف واژه‌نامه انگلیسی به فارسی
\newcommand\persiangloss[2]{#1\dotfill\lr{#2}\\}
% دستوری برای تعریف واژه‌نامه فارسی به انگلیسی 
\newcommand\englishgloss[2]{#2\dotfill\lr{#1}\\}

\newenvironment{proof}[1]{{\bf Proof.}{\rm
#1}}{\hfill$\rule{2.1mm}{3mm}$}

\newenvironment{solution}[1]{{\bf solution.}{\rm
#1}}{\hfill$\rule{2.1mm}{3mm}$}
%%%%%%%%%%%%%%%%%%%%%%%%%%
% تعریف و نحوه ظاهر شدن عنوان قضیه‌ها، تعریف‌ها، مثال‌ها و ...
\theoremstyle{definition}
\newtheorem{definition}{تعریف}[section]
\theoremstyle{theorem}
\newtheorem{theorem}[definition]{ قضیه}
\newtheorem{lemma}[definition]{لم}
\newtheorem{proposition}[definition]{گزاره}
\newtheorem{corollary}[definition]{نتیجه}
\newtheorem{remark}[definition]{تبصره}
\theoremstyle{definition}
\newtheorem{example}[definition]{مثال}
\newtheorem{sexample}[definition]{ مثال استاندارد }
\newtheorem{exercise}[definition]{تمرين}
%\newtheorem{solution}[definition]{حل}
%%%%%%%%%%%%%%%%%%%%%%%%%%
% تعریف دستورات جدید برای خلاصه نویسی و راحتی کار در هنگام تایپ فرمول‌های ریاضی
\newcommand{\R}{\mathbb{R}}
\newcommand{\N}{\mathbb{N}}
\newcommand{\m}{\mathfrak{m}}
\newcommand{\bt}{\begin{theorem}}
\newcommand{\et}{\end{theorem}}
\newcommand{\bl}{\begin{lemma}}
\newcommand{\el}{\end{lemma}}
\newcommand{\bc}{\begin{corollary}}
\newcommand{\ec}{\end{corollary}}
\newcommand{\bp}{\begin{proof}}
\newcommand{\ep}{\end{proof}}
\newcommand{\be}{\begin{example}}
\newcommand{\ee}{\end{example}}
\newcommand{\bse}{\begin{sexample}}
\newcommand{\ese}{\end{sexample}}
\newcommand{\bd}{\begin{definition}}
\newcommand{\ed}{\end{definition}}
\newcommand{\br}{\begin{remark}}
\newcommand{\er}{\end{remark}}
\newcommand{\bex}{\begin{exercise}}
\newcommand{\eex}{\end{exercise}}
\newcommand{\bs}{\begin{solution}}
\newcommand{\es}{\end{solution}}
\newcommand{\no}{\nonumber}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% دستورهایی برای سفارشی کردن ته برگ صفحات
%\newenvironment{prooff}{\rm {\bf proof}}{$\blacksquare$}

\csname@twosidetrue\endcsname
\pagestyle{fancy}
\fancyhf{} 
\fancyhead[OL,EL]{}
\fancyhead[OR]{}
\fancyhead[ER]{}
\renewcommand{\chaptermark}[1]{%
\markboth{\thechapter.\ #1}{}}
\cfoot{\thepage}



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


%\pagestyle{fancy}
%\fancyfoot[L]{}
%\fancyfoot[R]{17 لغایت 19 1391} 
%  \fancyhf{} % delete current header and footer
%\fancyhead[RO]{\begin{scriptsize}\bf\slshape\leftmark\end{scriptsize}\dotfill\bf\slshape \thepage}
%\fancyhead[LE]{\begin{scriptsize}\bf\slshape\rightmark\end{scriptsize}\dotfill\bf\slshape \thepage}
 %\fancyhead[RO]{\hfill {\fboxrule.80pt%
%\fbox{
%\begin{minipage}{ .90\textwidth} 
%\begin{scriptsize} \bf  \begin{flushright}
% \bf\slshape\leftmark
   % \end{flushright}
   %\end{scriptsize}
%\end{minipage}}}\hspace*{0.5mm}
%  {\fboxrule1.1pt%
  %  \fbox {%
%  \begin{footnotesize} 
 %\bf\slshape \thepage  
 %   \end{footnotesize}
   %  }} 
% } }
 
%\fancyhead[LE]{\hfill {\fboxrule.80pt%
%\fbox{
%\begin{minipage}{ 0.90\textwidth} 
%\begin{scriptsize} \bf  \begin{flushright}
% \bf\slshape\rightmark
    %\end{flushright}
   %\end{scriptsize}
%\end{minipage}}}\hspace*{0.5mm}
 %{\fboxrule1.1pt%
 %  \fbox {%
% \begin{footnotesize} 
%\bf\slshape \thepage  
%   \end{footnotesize}
 %    }} 
 %} }
% \renewcommand{\headrulewidth}{0.0pt}
 
% \renewcommand{\color{black}    \sayedar{  فصل}   } }

%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% دستورهایی برای ایجاد کادر (جعبه)
\newenvironment{fminipage}%
{\begin{Sbox}\begin{minipage}}%
{\end{minipage}\end{Sbox}\fbox{\TheSbox}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
