如何将阴影添加到我的框中,如下图所示

如何将阴影添加到我的框中,如下图所示
\documentclass{article}

\usepackage{amsmath,amsfonts}

\usepackage{tikz}
\usetikzlibrary{calc}
\usetikzlibrary{shapes.symbols,decorations.pathmorphing}

\newcommand{\syBrisse}[6][\textwidth-2\pgfkeysvalueof{/pgf/inner xsep}-4pt]
  {
    \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[anchor=north east,
            align=center, 
            minimum height=20pt,
            inner xsep=5pt] 
           (two) at (one.north east) 
           {#5 \hspace*{0.5mm}};

      \path[top color=#3,
            bottom color=#3,
            middle color=#3!35,draw=#3]
           ($(one.north west)+(2cm,-4.5pt)$)    [rounded corners=3pt] --
           ($(two.north west)+(-16.2pt,-4.5pt)$)                      --
           ($(two.south west)+(-4pt,0pt)$)       [sharp corners]      --
           (two.south east)                      [rounded corners]    --
           (two.north east)                                           --
           (one.north west)                      [sharp corners]      --
           ($(one.north west)+(0cm,-1cm)$)       [rounded corners]    --
           ($(one.north west)+(1.2cm,-1cm)$)                          -- cycle;

      \node[text=#2,
            anchor=north west,
            align=center, 
            minimum height=20pt,
            text height=2ex,
            inner sep=2cm, 
            inner ysep=3pt] 
           (three) at ($(one.north west)+(0,0pt)$)
           { #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)$) 
           { #5\hspace*{0.8mm}};

      \node[text=white,
            anchor=north west,
            align=center, 
            minimum height=5pt,
            inner sep=8pt,
            inner ysep=3pt] 
           at (one.north west) 
           {\small{\bf{ add to}}};
      %%%%%%matwiya

      \path[draw=#2,line width=1pt]
           (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)+(0cm,-1.03cm)$)                  [rounded corners=3pt,draw=gray!\x]   --
               ($(one.north west)+(1.2cm,-1.03cm)$)                                                     --
               ($(one.north west)+(2cm,-6.5pt+\x/100)$)            [rounded corners=3pt,draw=gray!\x]   --
               ($(two.north west)+(-17.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)+(.3cm,-1cm)$)      [rounded corners=3pt]   --
           ($(one.north west)+(1.2cm,-1cm)$)                             --
           ($(one.north west)+(2cm,-5.2pt)$)     [rounded corners=3pt]   --
           ($(two.north west)+(-17.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}

      \node[draw=white,
            line width=2pt,
            decorate,
            decoration={random steps,
                        amplitude = 1.2pt},
            middle color=white,
            right color=orange,
            middle color=red, 
            left color=yellow,
            text=white,
            anchor=north west,
            align=center,
            rectangle,
            outer sep=8pt,
           ] 
           at ($(one.north west)+(-0.4cm,-0.3cm)$) 
           {{\textbf{\ \  ur book\ }}};

      \end{tikzpicture}
      \end{center}}

\pgfdeclarelayer{background}
\pgfdeclarelayer{foreground}
\pgfsetlayers{background,main,foreground}

\begin{document}

\syBrisse[11.6cm]{blue!85!black}{blue!90!black}{{\bf }}{\bf theorem}{
 $\mathbb{C }$   $\dfrac{1}{z}$
.
\\
 $z$  $\mathbb{C }$ $\dfrac{1}{z}$
.
}

\end{document}

在此处输入图片描述

答案1

对于橙色物体下方的阴影,您可以drop shadow使用\usetikzlibrary{shadows}

\documentclass{article}

\usepackage{amsmath,amsfonts}

\usepackage{tikz}
\usetikzlibrary{calc}
\usetikzlibrary{shapes.symbols,decorations.pathmorphing}
\usetikzlibrary{shadows}

\newcommand{\syBrisse}[6][\textwidth-2\pgfkeysvalueof{/pgf/inner xsep}-4pt]
  {
    \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[anchor=north east,
            align=center, 
            minimum height=20pt,
            inner xsep=5pt] 
           (two) at (one.north east) 
           {#5 \hspace*{0.5mm}};

      \path[top color=#3,
            bottom color=#3,
            middle color=#3!35,draw=#3]
           ($(one.north west)+(2cm,-4.5pt)$)    [rounded corners=3pt] --
           ($(two.north west)+(-16.2pt,-4.5pt)$)                      --
           ($(two.south west)+(-4pt,0pt)$)       [sharp corners]      --
           (two.south east)                      [rounded corners]    --
           (two.north east)                                           --
           (one.north west)                      [sharp corners]      --
           ($(one.north west)+(0cm,-1cm)$)       [rounded corners]    --
           ($(one.north west)+(1.2cm,-1cm)$)                          -- cycle;

      \node[text=#2,
            anchor=north west,
            align=center, 
            minimum height=20pt,
            text height=2ex,
            inner sep=2cm, 
            inner ysep=3pt] 
           (three) at ($(one.north west)+(0,0pt)$)
           { #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)$) 
           { #5\hspace*{0.8mm}};

      \node[text=white,
            anchor=north west,
            align=center, 
            minimum height=5pt,
            inner sep=8pt,
            inner ysep=3pt] 
           at (one.north west) 
           {\small{\bf{ add to}}};
      %%%%%%matwiya

      \path[draw=#2,line width=1pt]
           (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)+(0cm,-1.03cm)$)                  [rounded corners=3pt,draw=gray!\x]   --
               ($(one.north west)+(1.2cm,-1.03cm)$)                                                     --
               ($(one.north west)+(2cm,-6.5pt+\x/100)$)            [rounded corners=3pt,draw=gray!\x]   --
               ($(two.north west)+(-17.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)+(.3cm,-1cm)$)      [rounded corners=3pt]   --
           ($(one.north west)+(1.2cm,-1cm)$)                             --
           ($(one.north west)+(2cm,-5.2pt)$)     [rounded corners=3pt]   --
           ($(two.north west)+(-17.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}

      \node[draw=white,
            line width=2pt,
            decorate,
            decoration={random steps,
                        amplitude = 1.2pt},
            middle color=white,
            right color=orange,
            middle color=red, 
            left color=yellow,
            text=white,
            anchor=north west,
            align=center,
            rectangle,
            outer sep=8pt,
            drop shadow={shadow scale=1.05},
           ] 
           at ($(one.north west)+(-0.4cm,-0.3cm)$) 
           {{\textbf{\ \  ur book\ }}};

      \end{tikzpicture}
      \end{center}}

\pgfdeclarelayer{background}
\pgfdeclarelayer{foreground}
\pgfsetlayers{background,main,foreground}

\begin{document}

\syBrisse[11.6cm]{blue!85!black}{blue!90!black}{{\bf }}{\bf theorem}{
 $\mathbb{C }$   $\dfrac{1}{z}$
.
\\
 $z$  $\mathbb{C }$ $\dfrac{1}{z}$
.
}

\end{document}

在此处输入图片描述

相关内容