\documentclass[12pt,a4paper]{report}



\usepackage{framed} 
\usepackage{xcolor}

\usepackage{tikz-cd}
\usepackage{tipa}
\usepackage{upgreek}
\usetikzlibrary{arrows}
\usepackage{amsthm,amssymb,amsmath}  
\DeclareMathOperator{\Tor}
‪\usepackage{setspace}
\usepackage{textcomp}
\usepackage[nottoc]{tocbibind}

\usepackage[top=3cm, bottom=3cm, left=2cm, right=3.5cm]{geometry}
\usepackage{setspace} % for switching between double/single space in document
 %\usepackage[colorlinks,citecolor=blue]{hyperref}

 


\usepackage{MnSymbol}  %بسته MnSymbol  را بعد از بسته amssymb باید فراخوانی کنید.


\usepackage{graphicx}
\usepackage{fancybox}

\usepackage{fancyhdr}
\usepackage{mathrsfs}
\usepackage{framed} 



\usepackage{makeidx}
\makeindex

\newenvironment{fminipage}
{\begin{Sbox}\begin{minipage}}%
		{\end{minipage}\end{Sbox}\fbox{\TheSbox}}

 \usepackage[pagebackref=false]{hyperref}
% ب) بسته hyperref جزو آخرین بسته هایی باید باشد که فراخوانی می شود.
% ج) بسته glossaries حتما باید بعد از hyperref فراخوانی شود.
\usepackage[xindy,acronym,nonumberlist=true]{glossaries}




\usepackage{xepersian}


\settextfont{XB Niloofar}



\settextfont{XB Zar}
\defpersianfont\FakeBoldFont[FakeBold=7]{XB Zar}



\setlatintextfont[Scale=.9]{Times New Roman}
\setdigitfont[Scale=1]{XB Zar}
\defpersianfont\nastaliq[Scale=2]{IranNastaliq}
\defpersianfont\chapternumber[Scale=3]{XB Niloofar}

\setlatintextfont[ExternalLocation,BoldFont={lmroman10-bold},BoldItalicFont={lmroman10-bolditalic},ItalicFont={lmroman10-italic}]{lmroman10-regular}

\deflatinfont\TimesNewRoman[Scale=1]{Times New Roman}
\newcommand{\lrftc}[1]{\LTRfootnote{\color{gray}#1}}
\newcommand{\ftc}[1]{\footnote{\color{gray}#1}}
 

\makeatletter
\renewcommand\section{\@startsection {section}{1}{\z@}%
{-3.5ex \@plus -1ex \@minus -.2ex}%
{2.3ex \@plus.2ex}%
{\normalfont\Large\XBZar\bfseries}}
\makeatother



\makeatletter
\renewcommand\subsection{\@startsection{subsection}{2}{\z@}%
{-3.25ex plus -1ex minus 
   -.2ex}%
   {1.5ex plus .2ex}%
  {\normalfont\Large\XBZar\bfseries}}
\makeatother


\makeatletter
\newcommand\mycustomfont[1]{\def\@mycustomfont{#1}}
\newcommand\mycustomraggedright{%
	\if@RTL\raggedleft%
	\else\raggedright%
	\fi}
\def\@part[#1]#2{%
	\ifnum \c@secnumdepth >-2\relax
	\refstepcounter{part}%
	\addcontentsline{toc}{part}{\thepart\hspace{1em}#1}%
	\else
	\addcontentsline{toc}{part}{#1}%
	\fi
	\markboth{}{}%
	{\centering
		\interlinepenalty \@M
		\@mycustomfont
		\ifnum \c@secnumdepth >-2\relax
		\huge\bfseries \partname\nobreakspace\thepart
		\par
		\vskip 20\p@
		\fi
		\Huge \bfseries #2\par}%
	\@endpart}
\def\@makechapterhead#1{%
	\vspace*{50\p@}%
	{\parindent \z@ \mycustomraggedright \@mycustomfont
		\ifnum \c@secnumdepth >\m@ne
		\if@mainmatter
		\huge\bfseries \@chapapp\space \thechapter
		\par\nobreak
		\vskip 20\p@
		\fi
		\fi
		\interlinepenalty\@M
		\Huge \bfseries #1\par\nobreak
		\vskip 40\p@
	}}


\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
	{-3.25ex\@plus -1ex \@minus -.2ex}%
	{1.5ex \@plus .2ex}%
	{\@mycustomfont\normalsize\bfseries}}


\makeatother
\mycustomfont{\XBZar}


\setlength{\parindent}{0pt}
\setlength{\parskip}{1ex plus 0.5ex minus 0.2ex}


\defpersianfont\Roya[Scale=1]{XB Roya}
\defpersianfont\Vahid[Scale=1]{XM Vahid}


\theoremstyle{definition}

\pagestyle{headings}

% حاشیه رنگی
\makeatletter
\newcommand*\LenToUnit[1]{#1\@gobble}
% \setbox\z@\hbox{\includegraphics[width=10cm]{ax}}
\newcommand*{\InstallMyImageOnNextPage}{%
	\AtBeginShipoutNext{%
		\nointerlineskip
		\AtBeginShipoutUpperLeft{%
			\put(\LenToUnit{\dimexpr\textwidth-\ht\z@\relax},0){\rotatebox{-90}{\copy\z@}}%
			\put(\LenToUnit{\dimexpr-\paperwidth+\textwidth\relax},\LenToUnit{\dimexpr-\paperheight+\wd\z@\relax}){\rotatebox{-90}{\copy\z@}}%
		}%
	}}
\makeatletter
       
\makeindex  %نمایه


  \pagestyle{fancy}
   \cfoot{}
  \lhead{\thepage}


    
\input{mygloss}

\begin{document}

	در این پایان نامه، به بررسی و مطالعه گروهها از دیدگاه احتمالات می پردازیم. یک
	\gls*{Subgroup}
	جدید که به نوعی تعمیم مناسبی از درجه جابجایی گروه می باشد، معرفی کرده و آن را مورد بررسی قرار می دهیم.  بدین صورت که،   احتمال اینکه جابجاگر دو عنصر انتخاب شده از یک گروه متناهی برابر یک عنصر معین از گروه باشد ودر حالت خاص اگر این عنصر معین همانی باشد ، آنگاه این احتمال همان درجه جابجایی گروه خواهد شد .در ادامه با بیان قضایایی ، کران بالا و کران پایین برای این احتمال جدید بدست خواهیم آورد و این احتمال را برای یک رده خاص از گروه متناهی  
	( با دو رده ی مزدوجی )
	مورد محاسبه قرار می دهیم.  یک مثال از \gls{Subgroup} هم اضافه شده است.\\ 


\printglossary

\end{document}
