%بسته ریاضی
\usepackage{amsthm,amssymb,amsmath,mathrsfs}

\usepackage{graphicx}
\usepackage{hyperref} 
\usepackage{setspace} 
\usepackage{fancyhdr}
%فاصله از بالا، پایین، چپ و راست
\usepackage[top=2.6cm,right=31mm,bottom=2cm,left=22mm]{geometry}                 
\usepackage{xepersian}
\graphicspath{{images/}}
\usepackage{framed} 
%افقی کردن پانویسها 
\RequirePackage[para*,perpage]{ednotes}
\SetFootnoteHook{\setRTL}
\DeclareNewFootnote[para]{O}[fnsymbol]
\renewcommand{\extrafootnoterule}{}
\SelectFootnoteRule[0]{extra}
\SetFootnoteHook{\setLTR}%--> must appear 
\DeclareNewFootnote[para]{x}[arabic]
\usepackage{perpage}
\MakePerPage{footnote}
%جایگزین کردن - بجای . بین شماره ها
\SepMark{-}
% تعیین فونت
\settextfont[Scale=1]{XB Zar}
% می توانید فونت جدیدی را هم وارد کنید به عنوان مثال در اینجا من فونتهای Tahoma و IranNastaliq راوارد کردم و چند خط آخر پیشگفتار را با این فونتها نوشتم.
\defpersianfont\nastaliq[Scale=1.5]{IranNastaliq}
\defpersianfont\tahoma[Scale=1.1]{Tahoma}
% جایگزین کردن برهان بجای اثبات
\renewcommand\proofname{\textbf{برهان}}
% تغییر  کتاب نامه به منابع و مآخذ
\renewcommand{\bibname}{منابع و مآخذ}
\usepackage[nottoc]{tocbibind}
%شناساندن دیکشنری فارسی به انگلیسی و برعکس
\newcommand\persiangloss[2]{#1\dotfill\lr{#2}\\}
\newcommand\englishgloss[2]{#2\dotfill\lr{#1}\\}
%وارد کردن عنوان ها
\theoremstyle{definition}
\newtheorem{definition}{تعریف}[section]
\theoremstyle{theorem}
\newtheorem{theo}[definition]{قضیه}
\newtheorem{coro}[definition]{نتیجه}
\newtheorem{remark}[definition]{ملاحظه}
\newtheorem{nok}[definition]{نکته}
\newtheorem{lemma}[definition]{لم}
\newtheorem{def-nok}[definition]{تعریف و نکته}
\theoremstyle{definition}
\newtheorem{ex}[definition]{مثال}
%اگر عنوان جدیدی را می خواهید وارد کنید بطور مشابه یکی از سطرهای بالا را کپی کنید و عنوان جدید را وارد کنید بعنوان مثال در زیر توجه و الگوریتم را اضافه کردیم
\newtheorem{tava}[definition]{توجه}
\newtheorem{algo}[definition]{الگوریتم}
% فارسی کردن اعداد
\setdigitfont{PGaramond}