「tcolorbox」パッケージの「dot」を「dash」に変更する

「tcolorbox」パッケージの「dot」を「dash」に変更する

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}

ここに画像の説明を入力してください

関連情報