# Changing "dot" to "dash" in "tcolorbox" package

I have created a box by using tcolorbox package that has been shown below:

Now, I want to change “dot” to “dash”. How can I do it?

• Welcome to TeX.SX! Please help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with \documentclass{...} and ending with \end{document}. Dec 2 '19 at 11:41
• Usually, we don't put a greeting or a “thank you” in our posts. While this might seem strange at first, it is not a sign of lack of politeness, but rather part of our trying to keep everything very concise. Accepting and upvoting answers is the preferred way here to say “thank you” to users who helped you. Dec 2 '19 at 11:42

We can make use of the number freestyle option when defining the tcolorbox environment.

Here is an example:

\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}


• Thank you so much 🙏
– Amin
Dec 2 '19 at 21:38
• @Amin I am happy that your problem has been fixed. Nevertheless try next time to consider Dexteritas's comments by providing a minimal working example (MWE) in the question and by accepting one of the answers if that answer fit you best. (;-) Dec 3 '19 at 7:40