"tcolorbox" 패키지에서 "점"을 "대시"로 변경

"tcolorbox" 패키지에서 "점"을 "대시"로 변경

tcolorbox아래 표시된 패키지를 사용하여 상자를 만들었습니다 .

여기에 이미지 설명을 입력하세요

이제 "점"을 "대시"로 변경하고 싶습니다. 내가 어떻게 해?

답변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}

여기에 이미지 설명을 입력하세요

관련 정보