I'm not seeing the point of this. When you start a new \part
, the chapter number is not reset. So if you have this skeleton
\part{First part}
\chapter{A}
\begin{Thm} text \end{Thm}
\chapter{B}
\begin{Thm} text \end{Thm}
\part{Second part}
\chapter{C}
\begin{Thm} text \end{Thm}
you'd get the theorems numbered
I.1.1
I.2.1
II.3.1
and knowing what part the theorem appears in is redundant.
Unless you also want to reset the chapter number at each \part
, which will be confusing as well, because you move the redundancy elsewhere.
Anyway, how can you do this? With a very simple instruction, namely
\counterwithin{chapter}{part}
Full example, where the geometry
line is used just to make smaller pictures.
\documentclass{scrreprt}
\usepackage[a6paper]{geometry}% just to make smaller pictures
\usepackage{amsmath,amsthm,thmtools}
\counterwithin{chapter}{part}
\declaretheorem[
numberwithin=chapter,
name=Theorem
]{Thm}
\begin{document}
\part{First part}
\chapter{A chapter}
\begin{Thm}
A theorem.
\end{Thm}
\chapter{Another chapter}
\begin{Thm}
Another theorem.
\end{Thm}
\part{Second part}
\chapter{Further chapter}
\begin{Thm}
Further theorem
\end{Thm}
\end{document}
If you want that chapter numbers are preceded by the part number (so adding a new layer of confusion), you can do it.
\documentclass{scrreprt}
\usepackage[a6paper]{geometry}% just to make smaller pictures
\usepackage{amsmath,amsthm,thmtools}
\counterwithin*{chapter}{part}
\declaretheorem[
numberwithin=chapter,
name=Theorem
]{Thm}
\renewcommand{\theThm}{\thepart.\thechapter.\arabic{Thm}}
\begin{document}
\part{First part}
\chapter{A chapter}
\begin{Thm}
A theorem.
\end{Thm}
\chapter{Another chapter}
\begin{Thm}
Another theorem.
\end{Thm}
\part{Second part}
\chapter{Further chapter}
\begin{Thm}
Further theorem
\end{Thm}
\end{document}
Of course your readers won't be able to find cross references to chapters, unless you always print something relating to the part in the page header and you will need to say “chapter 3 of part III” anyway. OK, the book is yours.
\documentclass{scrreprt}
\usepackage[a6paper]{geometry}% just to make smaller pictures
\usepackage{amsmath,amsthm,thmtools}
\counterwithin*{chapter}{part}
\declaretheorem[
numberwithin=chapter,
name=Theorem
]{Thm}
\renewcommand{\theThm}{\thepart.\thechapter.\arabic{Thm}}
\begin{document}
\part{First part}
\chapter{A chapter}
\begin{Thm}
A theorem.
\end{Thm}
\chapter{Another chapter}
\begin{Thm}
Another theorem.
\end{Thm}
\part{Second part}
\chapter{Further chapter}
\begin{Thm}
Further theorem
\end{Thm}
\end{document}
This might be the layout of a famous textbook. But I know of an even more famous textbook, namely Euclid's “Elements”. Do we need to follow Euclid's style? Of course not.