**€dit:**
Also mit mdframed geht es nahtlos (ok, ich werde nie wieder daran zweifeln :P )
![alt text][1]
    %ghostscript.yaml
    % arara: pdflatex
    % arara: ghostscript: {  resolution: 100 , device: pngalpha    }
    
    
    \documentclass[varwidth, margin=0pt]{standalone}
    %\documentclass{article}
    \usepackage{amsmath}
    \usepackage{tikz}
    \usepackage{caption}
    
    \usepackage[]{tcolorbox}
    
    \usepackage[tikz]{mdframed}
    
       \newcommand{\PICref}[1]{Abbildung \eqref{eq:#1}}
    
    %========
    \begin{document}
    %========
    \begin{mdframed}[backgroundcolor = yellow, outerlinewidth=4pt, roundcorner=5pt, outerlinecolor=olive]
    \begin{equation}
    a^2+b^2=c^2\label{eq:SdPy}
    \end{equation}
    
    In Gleichung  \eqref{eq:SdPy}, das ist die Gleichung mit  der Nummer \ref{eq:SdPy},  steht der Satz des Pythagoras; damit kann man Dreiecke berechnen, vgl.   \PICref{SdPy}.
    
    \begin{figure}[H]
    \begin{mdframed}[outerlinewidth=0.5pt, roundcorner=0pt, outerlinecolor=black]
    \centering
     \tikz[blue, very thick] \draw (0,0)--(5,0)--(3,2)--cycle;
    \caption*{\hspace{4cm} \PICref{SdPy}: Dreieck}
    \end{mdframed}
    \end{figure}
    
    
    \end{mdframed}
    %\end{tcolorbox}
    %========
    \end{document}
    %========
Verworfene Lösung
=================
Hier mal eine Lösung mit tcolorbox.
Wegen dem  Rand oben und unten hab ich alles Mögliche versucht, ich bekomme ihn nicht weg.
Evtl. kann ich das noch korrigieren.
![alt text][2]
    %ghostscript.yaml
    % arara: pdflatex
    % arara: ghostscript: {  resolution: 100   }
    
    
    \documentclass[varwidth, margin=0pt]{standalone}
    %\documentclass{article}
    \usepackage{amsmath}
    \usepackage{tikz}
    \usepackage{caption}
    
    \usepackage[]{tcolorbox}
    
       \newcommand{\PICref}[1]{Abbildung \eqref{eq:#1}}
    %\pagecolor{yellow}
    %========
    \begin{document}
    %========
    \tcbset{colback=yellow, colframe=olive,lower separated=false }
    \begin{tcolorbox}[
    left=2pt, right=2pt, top=2pt, bottom=2pt, 
    %enlarge top by=10cm,
    leftrule=10pt, rightrule=10pt, toprule=10pt, bottomrule=10pt,
    enlarge top by=0cm, 
    standard jigsaw, 
    arc=0pt, outer arc=0mm, 
    %  opacityframe=0.5,
    %  opacityback=0.2
    ]
    
    \begin{equation}
    a^2+b^2=c^2\label{eq:SdPy}
    \end{equation}
    
    In Gleichung  \eqref{eq:SdPy}, das ist die Gleichung mit  der Nummer \ref{eq:SdPy},  steht der Satz des Pythagoras; damit kann man Dreiecke berechnen, vgl.   \PICref{SdPy}.
    
    \begin{figure}[H]
    \begin{tcolorbox}[ standard jigsaw,  opacityback=0.2]
    \centering
     \tikz[blue, very thick] \draw (0,0)--(5,0)--(3,2)--cycle;
    \caption*{\hspace{4cm} \PICref{SdPy}: Dreieck}
    \end{tcolorbox}
    \end{figure}
    
    \end{tcolorbox}
    %========
    \end{document}
    %========
  [1]: http://texwelt.de/wissen/upfiles/Namenlos-7.png
  [2]: http://texwelt.de/wissen/upfiles/Namenlos-7-1.png