答案1
在以下示例中,我使用了包\newtcbtheorem
中的tcolorbox
元素。间距、颜色、编号方案等当然可以根据您的需要进行进一步调整:
\documentclass{report}
\usepackage[most]{tcolorbox}
\newtcbtheorem[auto counter, number within=chapter,]{mydef}{Definition}%
{enhanced jigsaw,%
sharp corners,%
boxrule=0pt,%
fonttitle=\color{orange}\bfseries,%
colback=orange!20!white,%
colbacktitle=orange!20!white,%
borderline north={2pt}{0pt}{orange},%
borderline south={2pt}{0pt}{orange},%
theorem style=plain
}{th}
\begin{document}
\chapter{chapter title}
\begin{mydef}{}{label}
contents
\end{mydef}
\end{document}