tcolorboxでファンシーボックスを作成する方法

tcolorboxでファンシーボックスを作成する方法

下のようなおしゃれな箱を作りたいです。 ここに画像の説明を入力してください しかし、これまでのところ、私は実際に必要なものではない以下の画像を作成することができました。 ここに画像の説明を入力してください ムウェ

\documentclass{article} 
\usepackage[many]{tcolorbox} 
\tcbuselibrary{skins} 
\newtcolorbox[auto counter,number within=section]{myex}[1][]{ 
before=\bigskip\centering,
after=\bigskip,
breakable, 
enhanced, 
arc=15pt, 
colback=white, 
fonttitle=\sffamily\bfseries,
title=Ex~\thetcbcounter,
frame hidden, 
sharp corners, 
rounded corners=southeast, 
attach boxed title to top left, 
boxed title style={ 
 enhanced, 
 colframe=purple!65!blue, 
 colback=purple!65!blue, 
 arc=5pt, 
 borderline east={2pt}{6pt}{white}, 
 borderline east={2pt}{2pt}{white}, 
 bottomrule=0pt, 
 rightrule=0pt, 
 sharp corners, 
}, 
interior style={}, 
 overlay={ 
 \draw[line width=1pt,purple!65!blue]([xshift=-3pt,yshift=.6cm]frame.north 
west)--([xshift=-3pt]frame.south west); 
 \draw[rounded corners=20pt,line width=1pt,purple!65!blue] ([xshift=-
3pt]frame.south west) -- (frame.south east)--(frame.north east); 
 \draw ([yshift=.6cm]frame.south east)--(frame.north east)--
([xshift=10cm]frame.north west); 
 } 
}
\begin{document} 
\begin{myex} 
What is meant by \textbf{electron affinity}. 
\end{myex} 
\end{document}

ご協力ありがとうございます

答え1

ここに画像の説明を入力してください このようなもの?

コード

\documentclass{article}
\usepackage{lipsum}
\usepackage[many]{tcolorbox} 
\tcbuselibrary{skins}
\xdefinecolor{pBlue}{RGB}{102, 53, 153}
\newtcolorbox[auto counter, number within=section]{myex}[1][]{%
  before=\bigskip\centering,
  after=\bigskip,
  breakable, 
  enhanced, 
  colback=white, 
  frame hidden, 
  sharp corners, 
  rounded corners=southeast,
  arc=25pt, 
  fonttitle=\sffamily, % \bfseries,
  title=Ex~\thetcbcounter,
  attach boxed title to top left={xshift=5pt}, %, xshifttext=5pt}, 
  boxed title style={%
    enhanced, 
    colframe=pBlue, 
    colback=pBlue, 
    borderline east={1.5pt}{8pt}{white}, 
    borderline east={1.5pt}{3.5pt}{white},
    borderline east={3.5pt}{0pt}{white},    
    borderline east={2.75pt}{0.25pt}{pBlue!50},    
    borderline east={2.75pt}{-4pt}{pBlue!20},    
    bottomrule=0pt, 
    rightrule=5pt, 
    sharp corners, 
  }, 
  interior style={}, 
  overlay={%
    \begin{scope}[line width=1.5pt, pBlue]
      \fill[shade, bottom color=pBlue!30, top color=white]
      ([xshift=-30pt]frame.south east)
      to[out=0, in=-90] ([yshift=30pt]frame.south east)
      -- ([shift={(-1pt, 15pt)}]frame.south east)
      to[out=-90, in=0] ([xshift=-25pt]frame.south east);
      \draw
      ([shift={(-1pt, 19pt)}]frame.north west) coordinate (iniPoint)
      -- ([xshift=-1pt]frame.south west)
      -- ([xshift=-30pt]frame.south east)
      to[out=0, in=-90] ([yshift=30pt]frame.south east)
      -- (frame.north east) -- ++(-2.5, 0) coordinate (endPoint);
      \draw (endPoint) -- ++(-3pt, 3pt) -- ++(-3pt, -3pt)
      -- ++(3pt, -3pt) -- cycle;
      \draw (iniPoint) -- ++(4pt, 0) -- ++(-8pt, 0);
      \draw (iniPoint) ++(0, -10pt) -- ++(6pt, 0) -- ++(-12pt, 0);
      \draw (iniPoint) ++(0, -14pt) -- ++(6pt, 0) -- ++(-12pt, 0);
    \end{scope}
  }
}
\begin{document}

\section{Test}

\begin{myex} 
  What is meant by \textbf{electron affinity}:
  \lipsum[1]
\end{myex} 
\end{document}

関連情報