답변1
number freestyle
환경 을 정의할 때 옵션을 활용할 수 있습니다 tcolorbox
.
예는 다음과 같습니다.
\documentclass{article}
\usepackage[theorems]{tcolorbox}
\newtcbtheorem[number freestyle=
\noexpand\thesubsection-\noexpand \arabic{\tcbcounter}]
{example}{Example}{colbacktitle=green!50!black}{exp}
\renewcommand{\thesubsection}{\thesection-\arabic{subsection}} % for the dash in
% the subsection number
\begin{document}
\section{First section}
\section{second section}
\subsection{First subsection}
\begin{example}{}{example1}
This is an example
\end{example}
\end{document}