I want to make a theorem's header stands in a separated line like (as style break in ntheorem)
Examples 1
(1) GL(n)
(2) SL(n)
I copied the solution from Theorem formatting, but it doesn't work if I begin the theorem by \begin{enumerate}.
\documentclass[12pt, a4paper]{amsart} %a minimal example
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\newtheoremstyle{mystyle}% name
{3pt}%Space above
{3pt}%Space below
{\normalfont}%Body font
{0pt}%Indent amount
{\itshape}% Theorem head font
{.}%Punctuation after theorem head
{\newline}%Space after theorem head 2
{}%Theorem head spec (can be left empty, meaning ‘normal’)
\theoremstyle{mystyle}
\newtheorem{exam}{Examples}
\begin{document}
\begin{exam}
\begin{enumerate} %If I begin with enumerate, the results are not good
\item $GL(n)$
\item $SL(n)$
\end{enumerate}
\end{exam}
\begin{exam}
Groups % if I begin with normal text, it works.
\begin{enumerate}
\item $GL(n)$
\item $SL(n)$
\end{enumerate}
\end{exam}
\end{document}