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

enter image description here

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

  • 3
    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}.
    – dexteritas
    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.
    – dexteritas
    Dec 2 '19 at 11:42

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

Here is an example:

\newtcbtheorem[number freestyle=
                      \noexpand\thesubsection-\noexpand \arabic{\tcbcounter}]

\renewcommand{\thesubsection}{\thesection-\arabic{subsection}} % for the dash in 
                                                               % the subsection number
\section{First section}
\section{second section}
\subsection{First subsection}
This is an example

enter image description here

  • 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.