[Tex/LaTex] counters of \declaretheorem and \newtheorem differ

countersnewtheoremthmtools

I want to use thmtools in order to state questions, that I want to repeat at a latter point of my text.
I declared the question-environment using \declaretheorem, but I also use theorem-environments I declared with \newtheorem. I want to have them to be numbered with the same counter (subsection), but it does not work.
Can you help me out please?

\documentclass{article}
\usepackage{amsmath,thmtools}
\newtheorem{theorem}{Theorem}[subsection]
\declaretheorem[name=Question,numberwithin=subsection]{question}
\begin{document}
\section{Section1}
\subsection{Subsection1}
\begin{theorem}
test1
\end{theorem}
\begin{theorem}
test2
\end{theorem}
\begin{restatable}{question}{questionone}
What it is all about?
\end{restatable}
\questionone*
\begin{theorem}
test 3
\end{theorem}

\begin{restatable}{question}{questiontwo}
Hmm?
\end{restatable}

\questiontwo*

\end{document}

theoremnumberingdoesntwork

Best Answer

Is this what you are trying to achieve?

demo

\documentclass{article}
\usepackage{amsmath,thmtools}
\newtheorem{theorem}{Theorem}[subsection]
\newtheorem{question}[theorem]{Question}
\begin{document}
\section{Section1}
\subsection{Subsection1}
\begin{theorem}
test1
\end{theorem}
\begin{theorem}
test2
\end{theorem}
\begin{restatable}{question}{questionone}
What it is all about?
\end{restatable}
\questionone*
\begin{theorem}
test 3
\end{theorem}

\begin{restatable}{question}{questiontwo}
Hmm?
\end{restatable}

\questiontwo*

\end{document}
Related Question