%	         			بِسْمِ اللهِ الرَّحْمٰنِ الرَّحيم _______________________________________________________
\documentclass[12pt]{thesis}
\usepackage{etex}
\reserveinserts{28}
\usepackage{setspace,xargs}
% برای فاصله گذاری استاندارد بین خطوط و دستورات با چند آرگومان اختیاری
\usepackage{amsthm,amssymb,amsfonts}
\usepackage[fleqn]{amsmath}
\usepackage[subnum]{cases}
% فونت‌ها، نمادها و محیط‌های ams
%
\usepackage{float}
\usepackage{zref-perpage}% جهت شماره گذاری از یک زیرنویسها در هر صفحه
\zmakeperpage{footnote}
\usepackage [pagebackref=true, colorlinks, linkcolor=blue, citecolor=magenta, urlcolor=cyan] {hyperref}
% چنانچه قصد پرینت گرفتن نوشته خود را دارید، خط بالا را غیرفعال و  از دستور زیر استفاده کنید. در ضمن pagebackref برای نشان دادن شماره صفحه ارجاعات مراجع در بخش bibliography است.

%\usepackage[pagebackref=false]{hyperref}
\hypersetup{
pdftitle={Thesis Title},
pdfauthor={akbar davoodi},
pdfsubject={Master Thesis},
pdfkeywords={keywords},
pdfdirection={R2L}
}
\usepackage{graphicx,xcolor}
\graphicspath{{./images/}}
% پکیج رنگ و گرافیک و تعریف پوشه عکس‌ها
\usepackage [a4paper, bindingoffset=-.5cm, footskip=1cm, headheight = 16pt, top=3cm, bottom=2.5cm,  right=3cm,  left=3cm ] {geometry}
% ابعاد صفحه و حاشیه‌ها
\usepackage{fancyhdr}
% تنظیم Heading
\usepackage{cite}
% تنظیم ارجاعات
\usepackage[nottoc]{tocbibind}
% اضافه کردن مراجع و نمایه به فهرست مطالب
\usepackage[textfont=it]{caption}

\usepackage{titletoc}
\usepackage{xcolor}
\usepackage{tikz}
\usepackage[font={small}]{caption}
\usepackage{listings}
\usepackage{maplestd2e}
% Glossaaires__________________________________________________ 

\usepackage[xindy={language=persian,codepage=utf8},toc]{glossaries}
%
\renewcommand\glsnamefont[1]{\rm #1}
%
\newglossarystyle{listdotpage}{%
    \glossarystyle{listgroup}
    \renewcommand*{\glossaryentryfield}[5]{%
      \item[\glstarget{##1}{##2}, ##5] \dotfill\space ##3}}
%
\newglossarystyle{listpagedot}{%
    \glossarystyle{listgroup}
    \renewcommand*{\glossaryentryfield}[5]{%
      \item[\glstarget{##1}{##2}] \dotfill\space \rl{, ##5}##3}}
%
      \newglossarystyle{notation}{%
    \glossarystyle{list}
    \renewcommand*{\glossaryentryfield}[5]{%
     \item[\parbox{1.3cm}{\LTR{\glstarget{##1}{##2}}}] \hspace{5pt} ##3,\space ##5}}
%
\renewcommand{\glossaryname}{واژه‌نامه فارسی به انگلیسی و نمایه}
%\renewcommand{\entryname}{\rl{نماد}}
%\renewcommand{\descriptionname}{\rl{توضیح}}
%\renewcommand{\pagelistname}{\rl{صفحه}}
%\setlength{\glsdescwidth}{60pt}
%
\newglossary[epx]{dicep}{epi}{epd}{واژه‌نامه انگلیسی به فارسی}
\GlsSetXdyLanguage[dicep]{english}
\makeglossaries
\loadglsentries{./chapters/dic.tex}
%\glsdisablehyper
\renewcommand\glsdisplayfirst[4]{\textit{#1}}
%\newcommand\gi[1]{\gls{#1}\index{\glsentrysort{#1}@\glsentrytext{#1}}}
\newcommand\gi[1]{\gls{#1}\glslink{ep#1}{}}
% دستور درج کلمه و اضافه شدن به واژه نامه
\newcommand\gn[1]{\glsentrytext{#1}}
% دستور درج کلمه بدون اضافه شدن به واژه نامه
\newcommand\gfirst[1]{\glsreset{#1}\gls{#1}\glslink{ep#1}{}}
% دستور درج کلمه به صورت ظهور اولین بار و اضافه شدن به واژه نامه
%   XePersian____________________________________________________ 
\usepackage{titlesec}
%\usepackage{xepersian}
\usepackage[extrafootnotefeatures]{xepersian}
%\usepackage{./styles/tempfix}
\settextfont[Scale=1.1]{Yas}
\setdigitfont[Scale=1.1]{PGaramond}
%\setlatintextfont[ExternalLocation,BoldFont={lmroman10-bold},BoldItalicFont={lmroman10-bolditalic},ItalicFont={lmroman10-italic}]{lmroman10-regular}
\defpersianfont\nastaliq[Scale=2]{IranNastaliq}
\defpersianfont\titr[Scale=1]{B Titr}
\defpersianfont\traffic[Scale=1]{B Traffic}
%%

%\titlespacing*{\sectionHlpcH*4H*2.3}[lpc] 
%   Titles__________________________________________________________
\renewcommand{\abstractname}{\Large چکیده}
\renewcommand{\listfigurename}{فهرست تصاویر}
\renewcommand{\latinabstract}{}
\renewcommand{\proofname}{\textbf{برهان}}
\renewcommand{\qedsymbol}{$\blacksquare$}
\renewcommand{\bibname}{مراجع}
\newcommand{\sectionname}{}
%    Environments_________________________________________________ 
%\SepMark{-}
%\newcounter{theorem}[section]
%\newcommand{\environ}[2]{\vspace{7pt} \refstepcounter{theorem}\par\noindent  \textbf{\hboxR{#1}\space\thetheorem} \textbf{\space\hboxR{#2}} \\[5pt]}
%\newcommand{\closeenviron}{\par\vspace{3pt}}
%\newenvironment{thm}[1][]{\environ{قضیه}{#1}\it}{\closeenviron}
%\newenvironment{lem}[1][]{\environ{لم}{#1}\it}{\closeenviron}
%\newenvironment{prop}[1][]{\environ{گزاره}{#1}\it}{\closeenviron}
%\newenvironment{cor}[1][]{\environ{نتیجه}{#1}\it}{\closeenviron}
%\newenvironment{con}[1][]{\environ{حدس}{#1}\it}{\closeenviron}
%\newenvironment{dfn}[1][]{\environ{تعریف}{#1}\rm}{‌\hfill $\blacktriangle$ \closeenviron}
%\newenvironment{notation}[1][]{\environ{نماد}{#1}\rm}{‌\hfill $\blacktriangledown$ \closeenviron}
%\newenvironment{rem}[1][]{\environ{تذکر}{#1}\rm}{‌\hfill $\blacklozenge$ \closeenviron}
%\newenvironment{exm}[1][]{\environ{مثال}{#1}\rm}{‌\hfill $\bigstar$ \closeenviron}
%
\newtheorem{thm}{قضیه}
\newtheorem{dfn}{تعریف}
%\makeatletter
%\newenvironment{prob}[4][]{\@ifempty{#1}
%{\vspace{15pt} \par\noindent
%\parbox{15cm}{\hskip 7pt\underline{\bf #2}\\[4pt]
%\begin{tabular}{p{40pt}l}
%\textbf{نمونه:}& \parbox[t]{11.8cm}{#3}\\[7pt]
%\textbf{سوال:}& \parbox[t]{11.8cm}{#4}
%\end{tabular}\vspace{5pt}
%}}
%{\vspace{5pt} \par\noindent
%\parbox{15cm}{\hskip 7pt\underline{\bf #2}\\[4pt]
%\begin{tabular}{p{40pt}l}
%\textbf{ثابت‌ها:}& \parbox[t]{11.5cm}{#1}\\[4pt]
%\textbf{نمونه:}& \parbox[t]{11.5cm}{#3}\\[7pt]
%\textbf{سوال:}& \parbox[t]{11.5cm}{#4}
%\end{tabular}\vspace{5pt}
%}}} {\\[5pt]}
%\makeatother
%  table of contents ______________________________________________

\titleformat{\chapter}[display]{ \filright\Huge}
{\enspace \chaptername\  \thechapter}
{6pt}{\bfseries\filleft}
%برخی تنظیمات برای عنوان فهرست مطالب
\titlecontents{chapter} [3pc] 
{\color{blue!50}\titlerule[3pt]\addvspace{1pc}\bfseries \filleft} 
{\color{black}\contentslabel 
[{\chaptername}
\thecontentslabel]{3pc}} 
{\color{black}}{\color{black}\hfill\contentspage} 
[\addvspace{1pc}] 
%تنظیم نوع فهرست مطالب
\titlecontents{section}[4pc]{\addvspace{2pt}\filleft} 
{\contentslabel[\sectionname\ \thecontentslabel\ ]{3pc}} 
{}{\dotfill \contentspage} 

%   Counters ___________________________________________________
\makeatletter
\def\thesection{\arabic{section}\@SepMark\thechapter}
\def\thesubsection{\arabic{subsection}\@SepMark\thesection}
\def\theequation{\arabic{equation}\@SepMark\thechapter}
\def\thetheorem{\arabic{theorem}\@SepMark\thesection}
\def\thefigure{\arabic{figure}\@SepMark\thechapter}
\def\thetable{\arabic{table}\@SepMark\thechapter}
\makeatother
%\numberwithin{equation}{section}
%   Main body__________________________________________________
%
\headheight = 20pt
\pagestyle{plain}
\fancyhf{}
\doublespacing
\allowdisplaybreaks[1]
% اجازه برای شکستن صفحه در وسط محیط ریاضی
%\SepMark{.}
\begin{document}
\newcommand{\ud}{\,\mathrm{d}}
\twocolumnfootnotes
\university{دانشگاه صنعتی اصفهان}
\department{دانشکده علوم ریاضی}
\type{رساله}
\subject{ پایان نامه کارشناسی ارشد ریاضی کاربردی}
\field{دستگاه های دینامیکی}
\title{}

%تاریخ دفاع
\newcommand{\repdate}{$\ \ 92 / \  10/ \  28$}
%زمان دفاع
\reptime{‌ \hspace{5pt} \repdate ساعت\ \space $ $  }
%محل دفاع
\repplace{سالن خوارزمی دانشکده علوم ریاضی}
\supervisor{}
\advisor{}
\mrmiss{}
%جنسیت نویسنده
\author{ }
%داور اول
\refreeA{}
%داور دوم
\refreeB{}
%سرپرست تحصیلات تکمیلی
\DGC{دکتر فرید بهرامی}
\thesisdate{1395}
%
%\approval
%\makefatitle
%\makethat

\newpage
%  Acknowledgement & Rights ______________________________________
%\input{./chapters/acknowledge}
%
\newpage
\ \vfill
\vspace{-12cm}
\tikzstyle{tmpvip}=%
[ultra thick,rectangle,draw=black!72,rounded corners=2mm,%
inner xsep=-1.3cm,inner ysep=0.4cm]
%\begin{center}
%\begin{tikzpicture}
%\node[tmpvip](mainbox){%
%\begin{minipage}{0.7\textwidth}
%\begin{persian}
%\begin{center}
%\thispagestyle{empty}
%\textbf{کلیه حقوق مادی مترتّب بر نتایج مطالعات، ابتکارات}



% \textbf{و نوآوری‌های ناشی از تحقیق موضوع این پایان‌نامه}
 
%\textbf{متعلّق به دانشگاه صنعتی اصفهان است.}

%\end{center}
%\end{persian}
%\end{minipage}};
%\node[viptitle] at (mainbox.west){\ding{'153}};
%\end{tikzpicture}
%\end{center}
%\ \vfill
% List of Contents, Figures and Abstract _______________________________
\begin{spacing}{1.7}
\tableofcontents
\listoffigures
\end{spacing}
\titleformat{\chapter}[display]{ \filright\Huge}
{\enspace \chaptername\  \thechapter}
{6pt}{\bfseries\filright}
\pagebreak
%\input{./chapters/abstract}
%   Chapters _______________________________________________________
\pagestyle{fancy}
%دستوری برای اینکه کشیدگی در کلمات ایجاد شود
\abovedisplayshortskip=10pt
\belowdisplayshortskip=8pt
%دستوری برای تنظیم فاصله عمودی قبل و بعد از فرمول‌ها
\rhead{\thepage}
\lhead{\leftmark}
%\input{./chapters/preface}
%\input{./chapters/chapter2}
%\input{./chapters/chapter3}
%\input{./chapters/chapter4}
%\input{./chapters/chapter5}
%\input{./chapters/chapter6}
%\input{./chapters/chapter7}
\input{./chapters/a}
% Print Bibs & Glossaries _____________________________________________
\titleformat{\chapter}[display]{ \filright\Huge}
{\enspace \chaptername\  \thechapter}
{6pt}{\bfseries\filleft}
%دستور تنظیم وسطچین برای عنوان مراجع و واژه‌نامه
\normalsize
\small
{\bibliographystyle{plain-fa}
%\setLTRbibitems
\DefaultMathsDigits
\begin{singlespace}
\bibliography{./chapters/bibliography}
%
\renewcommand{\glossarypreamble}{}
\renewcommand{\glossarypostamble}{}
\printglossary[style=listdotpage,type=main]
\renewcommand{\glsnamefont}[1]{\rm{\latinfont #1}}
\renewcommand{\glossarypreamble}{\setLTR\DefaultMathsDigits}
\renewcommand{\glossarypostamble}{\setRTL\AutoMathsDigits}
\printglossary[style=listpagedot,type=dicep]
\end{singlespace}
%
%  Latin Abstract _________________________________________________
% \begin{latin}
%\latintitle{ }
%\latinauthor{ }
%\latindegree{Master of Science}
%\authoremail{}
%\latinthesisdate{}
%\latinthesisyear{2014}
%\latinsupervisor{ }
%\supervisorm{ }
%\supervisoremail{ }
%\latinadvisor{ }
%\advisorm{ }
%\advisoremail{ }
%\latinrefreeA{ }
%\refreeAm{ }
%\latinrefreeB{ }
%\refreeBm{ }
%\latinDGC{ }
%\latinDGCm{ }
%\latinfaculty{Department of Mathematical Sciences}
%\latinuniversity{Isfahan University of Technology}
%\latincity{}
%\MSC{ }
%\latinkeywords{ }
%\makelatinabstract
%\makelatintitle
%\end{latin} 
%_________________________________________________________________

\end{document}