سلام
خواستهی شما با محیط mybox
با تعریف زیر برآورده میشود:
\newenvironment{mybox}[3]{\syBrisse[12cm]{#2}{#2}{}{\textbf{#1:}}{\persian#3}}
پس دستورات شما به صورت زیر است:
\documentclass[12pt,fleqn,explicit]{book}
\usepackage[left=1cm,right=1cm,bottom=2cm]{geometry}
\usepackage[x11names,usenames,dvipsnames,svgnames,table]{xcolor}
\usepackage{titlesec,titletoc}
\usepackage{xcolor}
\definecolor{mybluei}{RGB}{0,173,239}
\definecolor{myblueii}{RGB}{63,200,244}
\definecolor{myblueiii}{RGB}{199,234,253}
\usepackage{tikz}
\usetikzlibrary{calc}
\usetikzlibrary{shapes,snakes}
\pgfdeclarelayer{background}
\pgfdeclarelayer{foreground}
\pgfsetlayers{background,main,foreground}
%----------
\definecolor{azzul}{RGB}{6,96,167}
%----------
\newcounter{counter}
\newcommand{\syBrisse}[6][\textwidth-\pgfkeysvalueof{/pgf/inner xsep}-4mm]{%
\begin{center}
\par\bigskip%
\begin{tikzpicture}
\node[rounded corners, text width=#1, align=justify, inner sep=8pt, outer sep=0] (one)
{\medskip\parbox[t]{\textwidth}{\vspace*{22pt}\par#6}};
\node[text=black,anchor=north east,align=center, minimum height=20pt, inner xsep=5pt] (two) at (one.north east) {#5 \hspace*{.5mm}};
\path[fill=#2,draw=#2]
($(one.north west)+(0ex,-4.5pt)$) [rounded corners=3pt] --
($(two.north west)+(-22pt,-4.5pt)$) --
($(two.south west)+(-4pt,0pt)$) [sharp corners] --
(two.south east) [rounded corners] --
(one.north east) --
(one.north west) [sharp corners] -- cycle;
\node[text=black,anchor=north west,align=center, minimum height=20pt, text height=2ex,inner sep=8pt, inner ysep=3pt] (three) at ($(one.north west)+(0,-3pt)$) {#4};
\node[text=white,anchor=north east,align=center, minimum height=20pt, inner sep=8pt,inner ysep=6.5pt] (for) at ($(one.north east)+(0,1.5pt)$) {\stepcounter{counter}\thecounter.\thechapter#5\hspace*{0.8mm}};
\path[draw=#2,line width=0.8pt]
(one.south west) [rounded corners] --
(one.south east) [rounded corners] --
(one.north east) --
(one.north west) [rounded corners] -- cycle;
\foreach \x in {10,20,...,100}
\path[opacity=\x*0.01]
($(one.north west)+(0.4pt,-6.5pt+\x/100)$) [rounded corners=3pt,draw=gray!\x] --
($(two.north west)+(-23.3pt+\x/100,-6.5pt+\x/100)$) [rounded corners=3.5pt,draw=gray!\x] --
($(two.south west)+(-5.3pt+\x/100,-1.9pt+\x/100)$) --
($(two.south east)+(-0.4pt,-1.9pt+\x/100)$);
\path[draw=white,line width=1.1pt]
($(one.north west)+(0.4pt,-5.2pt)$) [rounded corners=3pt] --
($(two.north west)+(-22.3pt,-5.2pt)$) [rounded corners=3.5pt] --
($(two.south west)+(-4.3pt,-0.6pt)$) --
($(two.south east)+(-0.4pt,-0.6pt)$);
\begin{pgfonlayer}{background}
\path[fill=#3!5]
(one.south west) [rounded corners] --
(one.south east) [rounded corners] --
(one.north east) --
(one.north west) [rounded corners] -- cycle;
\path[opacity=0.5, top color=#3!5,bottom color=#3,middle color=#3!30]
(one.south west) [rounded corners] --
(one.south east) [sharp corners] --
($(one.south east)+(0ex,0.8cm)$) --
($(one.south west)+(0ex,0.8cm)$) [rounded corners] -- cycle;
\end{pgfonlayer}
\end{tikzpicture}
\end{center}
}
\usepackage[logo=on,
inlinemathdigits=persian,%
displaymathdigits=persian%
]{xepersian}
\settextfont[Scale=1.2]{Yas}
\settextdigitfont[Scale=.9]{Yas}
\setmathdigitfont[Scale=.9]{PGaramond}
\newenvironment{mybox}[3]{\syBrisse[12cm]{#2}{#2}{}{\textbf{#1:}}{\persian#3}}
\begin{document}
\null\vfill
\syBrisse[12cm]{CornflowerBlue}{CornflowerBlue}{ }{\textbf{تعریف:}}{
\begin{RTL}
اینجا هم متن ریاضی یا هر چیز دیگه هم باشد
\end{RTL}}
\begin{mybox}{تعریف}{red}{
\begin{RTL}
اینجا هم متن ریاضی یا هر چیز دیگه هم باشد
\end{RTL}
}
\end{mybox}
\begin{mybox}{لم}{cyan}{
\[a^5=b^5+c^5\]
}
\end{mybox}
\begin{mybox}{قضیه}{magenta}{
\begin{equation}
a^6=b^6+c^6
\end{equation}
}
\end{mybox}
\end{document}
و خروجی شما با نسخههای اولیهی تکلایو 2018 به صورت زیر است:
موفق باشید.