I’m using the \newtcbtheorem in tcolorbox package to produce my environments for theorem, lemma and proposition. I want these three environements be numbered by a same counter, producing a result like
Theorem 1.1
Proposition 1.2
Lemma 1.3
Theorem 1.4
…
So I write essentially
\newtcbtheorem[number within=section]{theorem}{Theorem}{}{th}
\newtcbtheorem[use counter=tcb@cnt@theorem, number within=section]{proposition}{Proposition}{}{pr}
\newtcbtheorem[use counter=tcb@cnt@theorem, number within=section]{lemma}{Lemma}{}{le}
However, when I want to refer these using \cref in cleveref package, I find that if I use \crefname to define the text in \cref, then the code should be like
\crefname{counter name of theorem}{theorem}{theorems}
\crefname{counter name of proposition}{proposition}{propositions}
\crefname{counter name of lemma}{lemma}{lemmas}
so with these three using a same counter, the last command takes place of the two before it, so whenever I refer to a theorem or proposition by
\cref{th:label}
the text before the number appears to be ``lemma’’.
Is there any way to fix this, without abandoning the usage of \cref?
Thanks in advance for any help.
tcolorbox
optionlabel type
, see the package manual and tex.stackexchange.com/a/179962.