I have defined a new theorem style using amsthm package and I have noticed that the \parindentI have included in the definition of the style in the line of code with comment indentation amount adds indentation to the head of the theorem instead of the body text of the theorem which is more desirable. I have noticed also that if I use the predefined default style of amsthm it adds indentation to the body of theorem and not to the head as I want. To make my wish clear: I want the head of the theorem with no indentation and the body text of the theorem with indentation. What I am doing wrong and how to control the indentation of the body text of the theorem in the definition of a new theorem style? Looking at the documentation of amsthm package I didn't find anything to help me.
The code:
\documentclass[12pt]{article}
\usepackage[a4paper, total={180mm,257mm},left=15mm,top=20mm]{geometry}
\usepackage[T1]{fontenc}
\usepackage{amsthm}
\newtheorem{thm}{Theorem}[section]
\newtheoremstyle{mythm}%⟨name⟩
{3pt}%⟨Space above⟩
{3pt}%⟨Space below⟩
{}%⟨Body font⟩
{\parindent}%⟨Indent amount)
{\bfseries\slshape}% ⟨Theorem head font⟩
{:}%⟨Punctuation after theorem head⟩
{\newline}%⟨Space after theorem head⟩
{}%⟨Theorem head spec (can be left empty, meaning ‘normal’)⟩
\theoremstyle{mythm}
\newtheorem{pytha}{Theorem of Pythagoras}[section]
\begin{document}
\section{First Section}
\begin{pytha}
Let $ABC$ right triangle with $\angle A=90^{\circ}$. Then for the sides of the triangle $AB, AC$ and $BC$ is true that:
\begin{equation}
(BC)^{2}=(AB)^2+(AC)^{2}
\end{equation}
\end{pytha}
\begin{thm}(Theorem of Pythagoras)
Let $ABC$ right triangle with $\angle A=90^{\circ}$. Then for the sides of the triangle $AB, AC$ and $BC$ is true that:
\begin{equation}
(BC)^{2}=(AB)^2+(AC)^{2}
\end{equation}
\end{thm}
\end{document}
\begin{thm}. – campa Aug 16 '22 at 07:51\newlinecommand? – miltos Aug 16 '22 at 10:50\newlinestarts a new line and not a new paragraph, so there is no indentation. But I fear I simply don't understand your requirements. Why hard-coding the name "Theorem of Pythagoras" in a new theorem environment? You'll probably be using it only once. And the indentation after the theorem head is very uncommon, it's like the indentation after a sectioning title. French typographic conventions? – campa Aug 16 '22 at 10:56