Sample example of box in latex
One option using the features provided by tcolorbox
:
\documentclass{article}
\usepackage[svgnames]{xcolor}
\usepackage[most]{tcolorbox}
\usetikzlibrary{shadows}
\newcounter{exa}
\tcbset{
myexample/.style={
enhanced,
colback=yellow!10!white,
colframe=red!50!black,
fonttitle=\scshape,
titlerule=0pt,
title={\refstepcounter{exa}example~\theexa.},
title style={fill=yellow!10!white},
coltitle=red!50!black,
drop shadow,
highlight math style={reset,colback=LightBlue!50!white,colframe=Navy}
}
}
\newtcolorbox{texample}{myexample}
\begin{document}
\begin{texample}
\centering
\tcbhighmath{\textrm{d}X_{t}=b(t,X_{t})+\sigma (t,X_{t}) \textrm{d}W_{t}}\quad
\begin{tabular}{|c|c|}
\hline
\textcolor{red!70!black}{W} & \textcolor{Navy}{C} \\
\hline
$+$ & $-$ \\
\hline
\end{tabular}
\end{texample}
\end{document}
Here's now an option using mdframed
and hf-tikz
:
\documentclass{article}
\usepackage[svgnames]{xcolor}
\usepackage[framemethod=tikz]{mdframed}
\usepackage[customcolors]{hf-tikz}
\usetikzlibrary{shadows}
\newcounter{exa}
\newmdenv[
settings={\refstepcounter{exa}},
linewidth=1pt,
innertopmargin=1.5\baselineskip,
roundcorner=6pt,
backgroundcolor=yellow!10,
linecolor=red!70!black,
frametitle=example~\theexa,
frametitlefont=\scshape\color{red!70!black},
shadow=true
]{mdexample}
\begin{document}
\begin{mdexample}
\centering
\hfsetfillcolor{LightBlue!50}
\hfsetbordercolor{Navy}
\tikzmarkin{a}(0.3,0.6)(-0.3,-0.4)$\textrm{d}X_{t}=b(t,X_{t})+\sigma (t,X_{t}) \textrm{d}W_{t}$\tikzmarkend{a}\qquad
\begin{tabular}{|c|c|}
\hline
\textcolor{red!70!black}{W} & \textcolor{Navy}{C} \\
\hline
$+$ & $-$ \\
\hline
\end{tabular}
\end{mdexample}
\end{document}
Here's the start of something that will create what you're looking for:
\documentclass{article}
\usepackage{xcolor}
\usepackage{fancybox}
\pagestyle{empty}
\begin{document}
\noindent
\shadowbox{%
\begin{minipage}{\dimexpr\textwidth-\shadowsize-2\fboxrule-2\fboxsep}
\textcolor{red}{\sffamily EXAMPLE 3.}\par\vspace{\baselineskip}
\hspace*{\fill}
%--------------------------%
\setlength{\shadowsize}{2pt}
\parbox{2in}{\shadowbox{$\displaystyle dX_t = - \frac{1}{2X_t}I(X_t\not=)dt+dW_t$}}
%--------------------------%
\hspace*{\fill}
%--------------------------%
{\sffamily
\begin{tabular}{|c|c|}\hline
\textcolor{red}{W} & \textcolor{blue}{S} \\\hline
$-$ & $-$ \\\hline
\end{tabular}}
%-------------------------%
\hspace*{\fill}\par\vspace{1ex}
\end{minipage}}
\end{document}
UPDATE
If you want to color the box, I would recommend you look at the examples using mdframed
given by @GonzaloMedina --- I'm not all that familiar with this package. You might also consider looking at the package tcolorbox
(also illustrated by GonzaloMedina), but it also seems to rely on the tikz
bundle of packages and libraries.