答案1
对我来说,它看起来像使用装饰库中的一些具有适当线宽和段长度的路径变形tikz
。
\documentclass{report}
\usepackage[dvipsnames]{xcolor}
\usepackage[skins]{tcolorbox}
\usetikzlibrary{decorations.pathmorphing}
\usepackage{fontawesome5}
\begin{document}
\begin{tcolorbox}[
enhanced,
frame empty,
title=Example,
sharp corners,
colback=yellow!30,
fonttitle=\sffamily\bfseries,
boxrule=0pt,
detach title,
before upper={\tcbtitle\\[1ex]},
coltitle=black,
fontupper=\sffamily,
overlay={
\path[draw=YellowOrange,decorate,line width=2mm,
decoration={coil,aspect=0,segment length=3mm}]
(frame.north west) -- (frame.south west);}
]
This is an \textbf{Example}.
\end{tcolorbox}
\begin{tcolorbox}[
enhanced,
frame empty,
title=\faExclamationTriangle\space Attention,
sharp corners,
colback=red!10,
fonttitle=\sffamily\bfseries,
boxrule=0pt,
detach title,
before upper={\tcbtitle\\[1ex]},
coltitle=black,
fontupper=\sffamily,
overlay={
\path[draw=red!30,decorate,line width=2mm,
decoration={saw,segment length=2.75mm}]
(frame.north west) -- (frame.south west);}
]
This is an \textbf{Attention}.
{\vspace{2ex}\centering\fboxsep=4pt\fbox{\parbox{1.65cm}{$\displaystyle
\sum_{i\in\oslash}\mathrm{a}_i=0.$}}\par}
\end{tcolorbox}
\end{document}