The statement of a theorem appearing on a new line

I'm using the amsthm package. The statement of the theorem currently appears immediately after the words "Theorem X." I'd like the statement of the theorem to appear on a new line. Is this possible?

-

Considering the following MWE

 1: \documentclass{article}
2:
3: \usepackage{amsthm}
4: \newtheorem{thm}{Theorem}
5:
6: \begin{document}
7:
8: \begin{thm}[Pythagoras' Theorem]
9:   In a right angled triangle the square of the hypotenuse is
10:   equal to the sum of the squares of the other two sides.
11: \end{thm}
12:
13: \end{document}


there are two possible approaches.

Simply adding a ~\\ at the end of line 8 of the MWE will yield your desired behaviour. However, you will have to do this every time you state a theorem.

2. The 'correct' solution

Better yet, define your own theorem style using the \newtheoremstyle macro as shown in the amsthm documentation. To do this, just insert the following lines between lines 3 and 4 of the MWE, i.e. directly before you define your thm environment:

\newtheoremstyle{custom}%    <name>
{\topsep}%   <space above>
{\topsep}%   <space below>
{\itshape}%  <body font>
{}%          <indent amount>

The newline is produced by setting the 8th argument (space after theorem head) to \newline. The other parameters are the default settings of the plain style of amsthm. Of course, you can customize those as well, if you want your theorems to look different.