# Enumerate alignment problem in theorem environment

I'm using amsart. When I create an enumeration inside a theorem environment, the numbering is not aligned properly:

Theorem 14. (1)
(2)
(3)
(4)


How do I shift the (2),(3),... to be aligned with (1)?

MWE:

\documentclass{amsart}
\newtheorem{thm}{Theorem}[section]

\begin{document}
\begin{thm}
\begin{enumerate}
\item Item 1
\item Item 2
\item Item 3
\end{enumerate}
\end{thm}
\end{document}

-
A simple solution is to use \  before \begin{enumerate}. It would align (1) with the other items. –  Guido Sep 23 '12 at 9:43
@Guido, I see it works. But that leaves a blank line. –  bob Sep 23 '12 at 9:45
–  David Carlisle Sep 23 '12 at 9:48
Your theorems won't have their text indented so that each lines starts at the right of the "Theorem n" label, so also this one shouldn't. Three possibilities (in order of personal preference): add some words before the enumerate; leave as amsart does; add \mbox{} before the enumerate (similar to what Guido suggests). –  egreg Sep 23 '12 at 9:52

## 3 Answers

The "official" AMS suggestion, presented in a FAQ entry, is to follow \begin{thm} with the command \leavevmode.

-
\documentclass{amsart}
\newtheorem{thm}{Theorem}[section]
\usepackage{enumitem}
\usepackage{calc}

\begin{document}
\begin{thm}
\begin{minipage}[t]{\linewidth-\widthof{\the\csname thm@headfont\endcsname Theorem \thethm. }}
\begin{enumerate}[leftmargin=*]
\item Item 1 this is meant to fill in the line till the end of line until it breaks in to second line.
\item Item 2
\item Item 3
\end{enumerate}%
\end{minipage}
\end{thm}
\end{document}


Update

Using linegoal package to calculate the length of the minipage:

\documentclass{amsart}
\newtheorem{thm}{Theorem}[section]
\usepackage{enumitem,linegoal}
\usepackage{calc}

\begin{document}
\begin{thm}
\begin{minipage}[t]{\linegoal}
\begin{enumerate}[leftmargin=*]
\item Item 1 this is meant to fill in the line till the end of line until it breaks in to second line.
\item Item 2
\item Item 3
\end{enumerate}%
\end{minipage}
\end{thm}
\end{document}

-
\documentclass{amsart}
\newtheorem{thm}{Theorem}[section]

\begin{document}
\begin{thm}\begin{minipage}[t]{\linewidth}
\begin{enumerate}
\item Item 1
\item Item 2
\item Item 3
\end{enumerate}
\end{minipage}
\end{thm}
\end{document}


-
Thanks! Is it possible to reduce the distance between the theorem and the list? –  bob Sep 23 '12 at 9:53
Did you try? I get Overfull \hbox (69.44412pt too wide) and, if the item text wraps, it will go beyond the right margin. –  egreg Sep 23 '12 at 9:56
@egreg: that is obviously that the box is too wide if there will be long lines ... And if there are long lines then the minipagewidth has to be corrected. –  Herbert Sep 23 '12 at 10:05
@egreg: I know! But I do not like complicated solutions if one do not need it. And for short item lines you do not need it! –  Herbert Sep 23 '12 at 10:14
I don't like incorrect solutions. At least add \hfuzz=\maxdimen, so the user won't be bothered with a (not so) spurious warning. –  egreg Sep 23 '12 at 10:20