tcolorbox를 사용하여 fancybox를 생성하는 방법

tcolorbox를 사용하여 fancybox를 생성하는 방법

아래와 같은 멋진 상자를 만들고 싶습니다. 여기에 이미지 설명을 입력하세요 하지만 지금까지 나는 실제로 필요한 것이 아닌 아래 이미지를 생성했습니다. 여기에 이미지 설명을 입력하세요 MWE

\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}

관련 정보