Bellow is some developed example solution I asked here tikz and mdframed + shadow drop and shading
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1,T2A]{fontenc}
\usepackage[english,russian]{babel}
\usepackage[a5paper]{geometry}
\usepackage{amsthm,thmtools}
\usepackage[framemethod=tikz]{mdframed}
\usepackage{amsmath,amssymb}
\usetikzlibrary{shadows.blur}
\usetikzlibrary{shapes.symbols}
\usetikzlibrary{shadows,shapes}
\usetikzlibrary{calc}
\usepackage{lipsum}
\newcounter{exercise}
\newtheorem{myexercise}{Exercise}[section]
\tikzset{myshadow/.style={ % custom shadow with tikz
opacity=.85,
shadow xshift=0.15,
shadow yshift=-0.15,
shade,
shading=axis,
shading angle=230}
}
\tikzstyle{titregris} =
[draw=gray, line width=1.0pt,%
text=white, rectangle,
right,minimum height=.7cm,
double,
shade,
top color=blue!40,
bottom color=blue!5,
rounded corners=8pt,
opacity=1,
shadow xshift=0.15,
shadow yshift=-0.15,
shade,
shading=axis,
shading angle=30,
drop shadow,
]
\tikzstyle{pointstyle} =
[draw=red, thick, fill=red,%
text=white, rectangle,
right,minimum height=.7cm,
double,
shade,
top color=red,
bottom color=blue!5,
rounded corners=3pt,
drop shadow
]
\renewcommand*\theexercise{Exercise \textnumero\arabic{exercise}}
\makeatletter
\def\mdf@@exercisepoints{}%new mdframed key:
\define@key{mdf}{exercisepoints}{%
\def\mdf@@exercisepoints{#1}
}
\def\mdf@@fig{}%new mdframed key:
\define@key{mdf}{fig}{%
\def\mdf@@fig{#1}
}
\def\mdf@@title{}%new mdframed key:
\define@key{mdf}{title}{%
\def\mdf@@title{#1}
}
\mdfdefinestyle{exercisestyle}{%
middlelinewidth=1.2pt,roundcorner=5pt,linecolor=gray,
%apptotikzsetting={\tikzset{mdfbackground/.append style ={%
%shading = exersicebackground}}},
apptotikzsetting={\tikzset{mdfbackground/.append style={top color=blue!40, bottom color=white}}},
innertopmargin=1.2\baselineskip,
skipabove={\dimexpr0.5\baselineskip+\topskip\relax},
skipbelow={-1em},
shadow=true,
shadowcolor=blue!35,
needspace=3\baselineskip,
frametitlefont=\sffamily\bfseries,
settings={\global\refstepcounter{exercise}},
singleextra={%
\node[titregris,xshift=1cm] at (P-|O) %
{~\mdf@frametitlefont{\theexercise}~\mdf@@title};
\ifdefempty{\mdf@@exercisepoints}%
{}%\node[fill=blue!40,font=\color{black},yshift=-51,circle,inner sep=1pt]
{\node[pointstyle,left,xshift=-1cm] at (P)%
{~\mdf@frametitlefont{\mdf@@exercisepoints pt.}~};},%
\ifdefempty{\mdf@@fig}%
{}%
{\path let \p1=(P), \p2=(O) in node[fill=blue!40,circle,inner sep=1pt,font=\color{white}] at (P|-0,0.5*\y2+0.5*\y1) {\mdf@@fig};}%
},
firstextra={%
\node[titregris,xshift=1cm] at (P-|O) %
{~\mdf@frametitlefont{\theexercise}~};
\ifdefempty{\mdf@@exercisepoints }%
{}%
{\node[pointstyle,left,xshift=-1cm] at (P)%
{~\mdf@frametitlefont{\mdf@@exercisepoints points}~};},%
{\node[pointstyle, left,xshift=1cm] {$\clubsuit$};}
},
}
\makeatother
\begin{document}
\begin{mdframed}[style=exercisestyle,exercisepoints=10,fig=$\spadesuit$,title= example $E=mc^2$]
%\begin{myexercise}
\begin{align}
\dot{n} &= u\cos\psi -v\sin\psi \\
\dot{e} &= u\sin\psi + v\cos\psi
\end{align}
For small angles the following approximation can be used:
\begin{align}
\dot{n} &= u -v\delta_\psi \\
\dot{e} &= u\delta_\psi + v
\end{align}
%\end{myexercise}
\end{mdframed}
\listoftheorems{myexercise}
\end{document}
almost everything can be passed, Now question is can there be "List of Exercise" and "add to toc" commands? Yes thee is a tocloft, but it needs command. With TiKZ this is discussed here Adding TikZ code to TOC . Do i need to wrap mdframed environment with another command? or there can be a another way? p.s. I tryied to use ntheorem to create new theorem , but when i do printing of list theorems it is not pronted in utf-8..It seems conflict with fontencoding..there are broken LIRC commands and i gave up with ntheorem
From here New Qestion starts: Sorry...I edited and rolled back original code...here is an code developed during discussion. Since that fancy 'suit' node gives problem, when frame splits on tho pages, in coe below i removed it being default. So user can pass 'right side suit fig', when he knows that environment is not splitting. Before if there was no use of this frame splitting was ok...in code below there appeared ne problem: environmet title is lost and only counter value is displayed.
here is a code:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1,T2A]{fontenc}
\usepackage[english,russian]{babel}
\usepackage[a5paper]{geometry}
\usepackage{amsthm,thmtools}
\usepackage[framemethod=tikz]{mdframed}
\usepackage{amsmath,amssymb}
\usetikzlibrary{shadows.blur}
\usetikzlibrary{shapes.symbols}
\usetikzlibrary{shadows,shapes}
\usetikzlibrary{calc}
\usepackage{lipsum}
\newcounter{exercise}
\newtheorem{myexercise}{Exercise}[section]
\tikzset{myshadow/.style={ % custom shadow with tikz
opacity=.85,
shadow xshift=0.15,
shadow yshift=-0.15,
shade,
shading=axis,
shading angle=230}
}
\tikzstyle{titregris} =
[draw=gray, line width=1.0pt,%
text=white, rectangle,
right,minimum height=.7cm,
double,
shade,
top color=blue!40,
bottom color=blue!5,
rounded corners=8pt,
opacity=1,
shadow xshift=0.15,
shadow yshift=-0.15,
shade,
shading=axis,
shading angle=30,
drop shadow,
]
\tikzstyle{pointstyle} =
[draw=red, thick, fill=red,%
text=white, rectangle,
right,minimum height=.7cm,
double,
shade,
top color=red,
bottom color=blue!5,
rounded corners=3pt,
drop shadow
]
%\renewcommand*\theexercise{Exercise \textnumero\arabic{exercise}}
\makeatletter
\def\mdf@@exercisepoints{}%new mdframed key:
\define@key{mdf}{exercisepoints}{%
\def\mdf@@exercisepoints{#1}
}
\def\mdf@@fig{}%new mdframed key:
\define@key{mdf}{fig}{%
\def\mdf@@fig{#1}
}
\def\mdf@@title{}%new mdframed key:
\define@key{mdf}{title}{%
\def\mdf@@title{#1}
}
\mdfdefinestyle{exercisestyle}{%
middlelinewidth=1.2pt,roundcorner=5pt,linecolor=gray,
apptotikzsetting={\tikzset{mdfbackground/.append style={top color=blue!40, bottom color=white}}},
innertopmargin=1.2\baselineskip,
skipabove={\dimexpr0.5\baselineskip+\topskip\relax},
skipbelow={-1em},
shadow=true,
shadowcolor=blue!35,
needspace=3\baselineskip,
frametitlefont=\sffamily\bfseries,
singleextra={%
\node[titregris,xshift=1cm] at (P-|O) %
{~\mdf@frametitlefont{Exercise~\textnumero\theexercise}~\mdf@@title};
\ifdefempty{\mdf@@exercisepoints}%
{}%\node[fill=blue!40,font=\color{black},yshift=-51,circle,inner sep=1pt]
{\node[pointstyle,left,xshift=-1cm] at (P)%
{~\mdf@frametitlefont{\mdf@@exercisepoints pt.}~};},%
\ifdefempty{\mdf@@fig}%
{}%
{\path let \p1=(P), \p2=(O) in node[fill=blue!40,circle,inner sep=1pt,font=\color{white}] at (P|-0,0.5*\y2+0.5*\y1) {\mdf@@fig};}%
},
firstextra={%
\node[titregris,xshift=1cm] at (P-|O) %
{~\mdf@frametitlefont{\theexercise}~};
\ifdefempty{\mdf@@exercisepoints }%
{}%
{\node[pointstyle,left,xshift=-1cm] at (P)%
{~\mdf@frametitlefont{\mdf@@exercisepoints points}~};},%
%{\node[pointstyle, left,xshift=1cm] {$\clubsuit$};}
},
}
\newcommand\listmdfname{List of Exercises}
\newcommand\listofmdframed{\section*{\listmdfname}%
\@mkboth{\MakeUppercase\listfigurename}%
{\MakeUppercase\listfigurename}%
\@starttoc{mdf}}
\newenvironment{mythm}[2][]
{\refstepcounter{exercise}\addcontentsline{mdf}{figure}{Exercise~\theexercise~#2}\begin{mdframed}[style=exercisestyle,#1,title=#2]}
{\end{mdframed}}
\makeatother
\begin{document}
\listofmdframed
\begin{mythm}[exercisepoints=10,fig=$\spadesuit$]{Example $E=mc^2$}
\begin{align}
\dot{n} &= u\cos\psi -v\sin\psi \\
\dot{e} &= u\sin\psi + v\cos\psi
\end{align}
For small angles the following approximation can be used:
\begin{align}
\dot{n} &= u -v\delta_\psi \\
\dot{e} &= u\delta_\psi + v
\end{align}
\end{mythm}
\begin{mythm}[exercisepoints=5,fig=$\spadesuit$]{Example $a=b$}
\begin{align}
\dot{n} &= u\cos\psi -v\sin\psi \\
\dot{e} &= u\sin\psi + v\cos\psi
\end{align}
For small angles the following approximation can be used:
\begin{align}
\dot{n} &= u -v\delta_\psi \\
\dot{e} &= u\delta_\psi + v
\end{align}
\end{mythm}
\vspace{0.1cm}
Here is problematic example:
\begin{mythm}[exercisepoints=10,]{Example Problematic}
\begin{align}
\dot{n} &= u\cos\psi -v\sin\psi \\
\dot{e} &= u\sin\psi + v\cos\psi
\end{align}
For small angles the following approximation can be used:
\begin{align}
\dot{n} &= u -v\delta_\psi \\
\dot{e} &= u\delta_\psi + v
\end{align}
\end{mythm}
\begin{mythm}[exercisepoints=5,fig=$\spadesuit$]{Example $a=b$}
\begin{align}
\dot{n} &= u\cos\psi -v\sin\psi \\
\dot{e} &= u\sin\psi + v\cos\psi
\end{align}
For small angles the following approximation can be used:
\begin{align}
\dot{n} &= u -v\delta_\psi \\
\dot{e} &= u\delta_\psi + v
\end{align}
\end{mythm}
\end{document}
i think passing 'MyTheoremEnv1' as Key instead of having just hardwired text Exercise might solve this?


mdframedis just a shell for such environments. If you want to have a new listof you have to declare it. – Marco Daniel Jun 15 '13 at 20:52\addcontentsline; this can be done automatically; please see my answer below. – Gonzalo Medina Jun 15 '13 at 21:21