\documentclass[12pt]{article}
\usepackage{amsthm,amssymb,amsmath}
\usepackage[all]{xy}
\usepackage{pgf,pgfplots,tikz}
\usetikzlibrary{snakes,arrows,matrix,shapes,backgrounds}
%\pgfplotsset{width=7cm,compat=newest}
\usepackage{xepersian}
\settextfont[Scale=1]{XB Niloofar}
\makeatletter
\def\tikzpicture{\ifmmode\else\LTR\fi\origin@tikzpicture}
\def\endtikzpicture{\origin@endtikzpicture\ifmmode\else\endLTR\fi}

\makeatother

\begin{document}
\section{1}
این یک متن آزمایشی هست برای تنظم فاصله نمودار با متن و خطای که به زی‌پرشین میگیرد یا زمنی زی‌پرشین را می‌گذاریم خطا می‌گیرد
\begin{equation}
\begin{tikzpicture}[baseline=(current
    bounding box.center),thick,>=stealth,->,shorten >=2pt,looseness=.5,auto,descr/.style={fill=white}]

\matrix [matrix of math nodes,row sep=10mm,column sep=10mm]
{
&|(1)|\mathcal{U}_\alpha& \\
|(2)|\Sigma_g &  &|(3)|\mathcal{U}_\alpha \cup_\Sigma \mathcal{U}_\beta\\
&|(4)|\mathcal{U}_ \beta&\\
};

\begin{scope}[every
node/.style={->,sloped,midway,auto,font=\scriptsize}]
\draw (2) -- node[] {$i^\alpha$} (1);
\draw (2) -- node[] {$i^\beta$} (4);
\draw (1) -- node[] {$I^\alpha$} (3);
\draw (4) -- node[] {$I^\beta$} (3);
\end{scope}
\end{tikzpicture}
\end{equation}

این یک متن آزمایشی هست برای تنظم فاصله نمودار با متن و خطای که به زی‌پرشین میگیرد یا زمنی زی‌پرشین را می‌گذاریم خطا می‌گیرد
\begin{equation}
\xymatrix{
                                                                               & \mathcal{U}_\alpha \ar[dr]^{I^\alpha}  &  \\
 \Sigma_g \ar[ur]^{i^\alpha} \ar[dr]_{i^\beta} &                                      & \mathcal{U}_\alpha \cup_\Sigma \mathcal{U}_\beta   \\
                                                                               &  \mathcal{U}_ \beta \ar[ur]^{I^ \beta}  &  }
\end{equation}
این یک متن آزمایشی هست برای تنظم فاصله نمودار با متن و خطای که به زی‌پرشین میگیرد یا زمنی زی‌پرشین را می‌گذاریم خطا می‌گیرد
تنتنتننننننننننننننننننننننننننننننننننننننننن
\end{document}
