\usepackage{graphicx} % inserting images
\usepackage{color}
\usepackage{paralist}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amsfonts}
\usepackage{lscape}
\usepackage{setspace} 
\usepackage{tocbibind}
\usepackage{makeidx}
\usepackage{fancyhdr} 
\usepackage{subfigure}
\usepackage{mathtools}
\usepackage{fancyvrb} 
\usepackage{algorithm}
\usepackage{amssymb}
\usepackage[colorlinks,linkcolor=blue,citecolor=magenta]{hyperref} % for pdf
%\usepackage[colorlinks,linkcolor=Black,citecolor=Black]{hyperref}  % for print
\usepackage{relsize}
\usepackage[top=30mm, bottom=25mm, left=25mm, right=35mm]{geometry}                  
\usepackage{xepersian}

\setdigitfont[Scale=1.1]{ParsiDigits}
\settextfont[Scale=1.2]{Yas}
\defpersianfont\irannastaliq[Scale=1.6]{IranNastaliq}
\defpersianfont\persiantitle[Scale=1.6]{Yas}
\defpersianfont\authername[Scale=1.3]{Yas}
\setfootnoteLR
\graphicspath{{images/}}
\pagestyle{fancy}
\cfoot{}
\lhead{\thepage}
\makeindex
%%%%%%%%%%%
\makeatletter
\g@addto@macro\normalsize{%
  \setlength\abovedisplayskip{20pt}
  \setlength\belowdisplayskip{15pt}
  \setlength\abovedisplayshortskip{20pt}
  \setlength\belowdisplayshortskip{12pt}
}
\makeatother
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% دستوری برای تعریف واژه‌نامه انگلیسی به فارسی
\newcommand\persiangloss[2]{#1\dotfill\lr{#2}\\}
%% دستوری برای تعریف واژه‌نامه فارسی به انگلیسی 
\newcommand\englishgloss[2]{#2\dotfill\lr{#1}\\}

% تعریف و نحوه ظاهر شدن عنوان قضیه‌ها، تعریف‌ها، مثال‌ها و ...
\newtheorem{definition}{تعریف} [section]
\newtheorem{Theorem}{قضیه}[section]
\newtheorem{lemma}{لم}[section]
\newtheorem{proposition}{گزاره}[section]
\newtheorem{corollary}{نتيجه}[section]
\newtheorem{remark}{نکته}[section]
\newtheorem{example}{مثال}[section]
\newtheorem{question}{سوال}[section]
\newtheorem{notation}{نمادگذاری}[section]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%