这是我到目前为止捕获的内容,我尝试使用\tcb设置画出盒子...但我遇到了一堆错误。
编辑:我当前的代码
\tcbset{/ .style={
colback=yellow2!,
enlarge top by=1cm,
enhance,
breakable,
boxrule=0pt,
top=7mm,
drop fuzzy shadow,
overlay unbroken = {\draw[color=red!80!yellow, line width =3pt]
([xshift=2pt] frame.north west)--([xshift=2pt] frame.south west);
\draw[color=red!80!yellow, line width =1pt]
( frame.north west)--(frame.north east);
\node[rectangle] at ([[xshift=1cm, yshift=0.45cm ] frame.north west)
{\includegraphics[scale=0.06]{imagesInskscape/caracol}};
\node[rectangle, draw=DeepSkyBlue1, fill=DeepSkyBlue1,
font=\LARGE\bfseries, text=white, rounded corners=8pt, minimum width =3cm,
inner sep=1mm, anchor=north west] at ( [xshift=4cm, yshift=0.3cm] frame.north west){ Example};
},overlay first ={\draw[color=red!80!yellow, line width =3pt]
([xshift=2pt] frame.north west)--([xshift=2pt] frame.south west);
\draw[color=red!80!yellow, line width =1pt]
( frame.north west)--( frame.north east);
\node[rectangle] at ([xshift=1cm, yshift=0.45cm ] frame.north west)
{\includegraphics[scale=0.06]{imagesInskscape/caracol}};
\node[rectangle, draw=DeepSkyBlue1, fill=DeepSkyBlue1,
font=\LARGE\bfseries, text=white, rounded corners=8pt, minimum width =3cm,
inner sep=1mm, anchor=north west] at ( [xshift=4cm, yshift=0.3cm] frame.north west){ Example};
},
overlay middle ={ \draw[color=red!80!yellow!50, line width =3pt]
([xshift=2pt] frame.north west)--([xshift=2pt] frame.south west);
},
overlay last ={\draw[color=red!50!black!50, line width =3pt]
( [xshift=3pt] frame.north west)--( [xshift=2pt] frame.north west); }}}
\begin{tcolorbox}[]
\begin{enumerate}
\end{enumerate}
\end{tcolorbox}
答案1
你可以从以下方式开始:
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage{mathtools,amsfonts}
\usepackage{enumitem}
\usepackage[svgnames]{xcolor}
\usepackage[most]{tcolorbox}
\usepackage[spanish]{babel}
\tcbset{
exstyle/.style={enhanced, colback=Indigo!5, colframe=Indigo,
fonttitle=\bfseries,
colbacktitle=Indigo, coltitle=white,
top=\tcboxedtitleheight,
boxed title style={},
attach boxed title to top left={yshift=-\tcboxedtitleheight/2,
xshift=4mm}%
},
teostyle/.style={enhanced, colback=DarkOrchid!15, colframe=DarkOrchid,
fonttitle=\bfseries, sharp corners, boxrule=0pt,
colbacktitle=DarkOrchid, coltitle=white,
drop fuzzy shadow,
top=\tcboxedtitleheight,
boxed title style={sharp corners},
attach boxed title to top left={}%
},
}
\newtcbtheorem[number within=section]{miEjemplo}{Ejemplo}{exstyle}{ex}
\newtcbtheorem[number within=section]{miTeorema}{Teorema}{teostyle}{teo}
\begin{document}
\section{Ejemplos}
\begin{miEjemplo}{Un ejemplo}{label}
\begin{enumerate}[label=\emph{\alph*}.)]
\item Si $a=144$ y $b=99$,
\begin{align*}
144 & = 89\cdot 1+55, \text{con resto}\ r_2=55<b=89\\
144 & = 89\cdot 2-34, \text{con resto}\ r_1=34<b=89
\end{align*}
\end{enumerate}
\end{miEjemplo}
\section{Teoremas}
\begin{miTeorema}{Un teorema}{label}
Sean $a, b\in \mathbb{Z}$ con $b\neq 0$. Sea $q\in \mathbb{Z}$ \dots
\end{miTeorema}
\end{document}