%-------------------------------------------------------------------------------------------------------------------
\usepackage{amsthm,amsfonts,amssymb,amsmath,mathrsfs}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{mathtools}
\usepackage{pifont}
\usepackage{latexsym}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage[pagebackref=false]{hyperref} 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\usepackage{setspace} % for switching between double/single space in document

\usepackage[top=35mm, bottom=30mm, left=30mm, right=35mm]{geometry}
%\usepackage{titlesec}   

\usepackage{color,graphicx} % inserting images

\usepackage{framed} 

\usepackage{lastpage}

\usepackage[arc,all]{xy}
\usepackage{tikz}
\usetikzlibrary{shapes,arrows,positioning}
\usepackage{fancyhdr}
%\pagestyle{fancy}
\pagestyle{plain}
\cfoot{}
\rhead{\thepage}

\usepackage[nottoc]{tocbibind}
\usepackage{makeidx}
\makeindex
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{subfigure}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%دستوراتی برای ایجاد زیرنویس افقی

\RequirePackage[para*,perpage]{ednotes}
%Lets have two layer of footnotes
%\makeatletter
\SetFootnoteHook{\setRTL}%--> must appear  immediately before \DeclareNewFootnote 
\DeclareNewFootnote[para]{O}[fnsymbol]
\renewcommand{\extrafootnoterule}{}
\SelectFootnoteRule[0]{extra}
% با دستور خط پنجم  {\setLTR}   چپ به راست  را مشخص میکند که برای راست به چپ مثل پایین {\setRTL} را می‌نویسیم
%حرف C داخل ابرو (خط 6) باعث می‌شود فرمان پانویستان اینگونه شود   \footnoteC{}و arabic  نوع %شماره بندی را مشخص میکند
\SetFootnoteHook{\setLTR}%--> must appear 
\DeclareNewFootnote[para]{C}[arabic]
\usepackage{perpage}
\MakePerPage{footnote}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{fancybox} 

%\usepackage{supertabular}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage[mathscr]{euscript}
\usepackage{xepersian}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\SepMark{-}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% از revision 118 زی‌پرشین به بعد، وارد کردن دستور زیر لازم نیست. توجه داشته باشید که در صورت  غیرفعال کردن این دستور، از فونت پیش‌فرض لاتک برای کلمات انگلیسی استفاده خواهد شد.
\setlatintextfont[ExternalLocation,BoldFont={lmroman10-bold},BoldItalicFont={lmroman10-bolditalic},ItalicFont={lmroman10-italic}]{lmroman10-regular}

\settextfont[Scale=1]{XB Zar}
%\settextfont[Scale=1.1]{B Nazanin}
\setiranicfont[Scale=1]{XB Zar Oblique}
% چنانچه می‌خواهید اعداد در فرمول‌ها، انگلیسی باشد، خط زیر را غیرفعال کنید
\setdigitfont[Scale=.85]{Persian Modern}

% تعریف قلم‌های فارسی و انگلیسی اضافی برای استفاده در بعضی از قسمت‌های متن
\defpersianfont\nastaliq[Scale=2]{IranNastaliq}
\defpersianfont\davat[Scale=1]{B Davat}
\defpersianfont\nazanin[Scale=1]{B Nazanin}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% دستوری برای تغییر نام کلمه «اثبات» به «برهان»
\renewcommand\proofname{\textbf{برهان}}
% دستوری برای تغییر نام کلمه «کتاب‌نامه» به «مراجع»
%\renewcommand{\bibname}{مراجع}
\renewcommand{\chaptername}{فصل}
\renewcommand{\contentsname}{فهرست}
%\renewcommand{\listfigurename}{نگاره‌ها}

% دستوری برای حذف کلمه «چکیده»
%\renewcommand{\abstractname}{}
% دستوری برای حذف کلمه «abstract»
%\renewcommand{\latinabstract}{}
% دستوری برای مربع سیاه در آخر اثبات
%\def\qedsymbol{\blacksquare}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% دستوری برای تعریف واژه‌نامه انگلیسی به فارسی
\newcommand\persiangloss[2]{#1\dotfill\lr{#2}\\}
% دستوری برای تعریف واژه‌نامه فارسی به انگلیسی 
\newcommand\englishgloss[2]{#2\dotfill\lr{#1}\\}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% تعریف و نحوه ظاهر شدن عنوان قضیه‌ها، تعریف‌ها، مثال‌ها و ...
\newtheoremstyle{customTH}{}{}{}{}{\bfseries}{}{ }{}
\theoremstyle{customTH}
%\theoremstyle{definition}
\newtheorem{definition}{تعریف}[chapter]

%\theoremstyle{theorem}
\newtheorem{theo}[definition]{قضیه}
\newtheorem{theorem}[definition]{قضیه}
\newtheorem{lemma}[definition]{لم}
\newtheorem{prop}[definition]{گزاره}
\newtheorem{proposition}[definition]{گزاره}
\newtheorem{coro}[definition]{نتیجه}
\newtheorem{corollary}[definition]{نتیجه}
\newtheorem{nok}[definition]{نکته}
\newtheorem{nok-def}[definition]{نکته و تعریف}
\newtheorem{def-nok}[definition]{تعریف و نکته}
\newtheorem{algoritm}{الگوریتم}

\theoremstyle{definition}
\newtheorem{ex}[definition]{مثال}
\newtheorem{example}[definition]{مثال}
\newtheorem{conj}[definition]{فرضیه}
\newtheorem{conjecture}[definition]{فرضیه}

\theoremstyle{remark}
\newtheorem{remark}{تذکر}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% تعریف دستورات جدید برای خلاصه نویسی و راحتی کار در هنگام تایپ فرمول‌های ریاضی
\def\opn#1#2{\def#1{\operatorname{#2}}} % to make operators
\opn\reg{reg}
\opn\Supp {Supp}
\opn\Ass { Ass}
\opn\depth {depth}
\opn\grade {grade}
\opn\Sym {Sym}
\opn\Spec {Spec}
\opn\Max { Max}
\opn\Min { Min}
\opn\Ext {Ext}
\opn\Tor {Tor}
\opn\Ann { Ann}
\opn\rank {rank}
\opn\codim {codim}
\opn\htt {ht}
\opn\pd {pd}
\opn\id {id}
\opn\Hom { Hom}
\opn\Ima {Im}
\opn\coker {coker}
\opn\kernn {Ker}
\opn\mindeg { mindeg}
\opn\degi { deg}
\opn\Tot {Tot}
\opn\EN {EN}
%maximal and prime Ideals 
\newcommand\pp {\mathfrak{p}}
\newcommand\mm {\mathfrak{m}}
\newcommand\nn {\mathfrak{n}}

\newcommand\Ss {\mathcal{S}}
%Monomial Ideals
\opn\sat {sat}
\opn\Mon {Mon}
\opn\Char {Char}
\opn\ini {in_{<}}
\opn\gini {gin_{<}}
\opn\Gin {Gin}
\opn\inirev {in_{\underset{\mathrm{rev}}{<}}}
\opn\Socle {Socle}
\newcommand\dis {\displaystyle}
\newcommand\lex {\underset{\mathrm{lex}}{<}}
\newcommand\rev {\underset{\mathrm{rev}}{<}}
\newcommand\plex {\underset{\mathrm{purelex}}{<}}
\newcommand\inlex {\mathrm{in}_{\underset{\mathrm{lex}}{<}}}
\newcommand\inrev {\mathrm{in}_{\underset{\mathrm{rev}}{<}}}
%matrix
\opn\GLn {GL_n}
\opn\Mn {M_n}
%System for Doing Computation in Commutative Algebra
\opn\cocoa {CoCoA}
\opn\maca {Macaulay2}
%absolute function
\newcommand{\abs}[1]{\lvert#1\rvert}
\newcommand{\upbraket}[1]{\lceil#1\rceil}
\newcommand{\bigupbraket}[1]{\Big\lceil#1\Big\rceil}
% تعریف دستورات جدید برای خلاصه نویسی و راحتی کار در هنگام تایپ فرمول‌های ریاضی
\newcommand{\bR}{\mathbb{R}}
\newcommand{\cB}{\mathcal{B}}
\newcommand{\cO}{\mathcal{O}}
\newcommand{\cG}{\mathcal{G}}
\newcommand{\cU}{\mathcal{U}}
\newcommand{\cK}{\mathcal{K}}
\newcommand{\cS}{\mathcal{S}}
\newcommand{\rM}{\mathrm{M}}
\newcommand{\rC}{\mathrm{C}}
\newcommand{\rV}{\mathrm{V}}
\newcommand{\ls}{\mathrm{LSC}_{+}(X)}
\newcommand{\ce}{\mathrm{C}^{*}(X)}
\newcommand{\lsc}{\mathrm{LSC}}
\newcommand{\fB}{\mathfrak{B}}
\newcommand{\fM}{\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{\bd}{\begin{definition}}
\newcommand{\ed}{\end{definition}}
\newcommand{\ba}{\begin{align}}
\newcommand{\ea}{\end{align}}
\newcommand{\no}{\nonumber}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%معرفی پوشه محل ذخیره عکسهای درون پایان نامه
\graphicspath{{images/}}