34

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}
lockstep
  • 250,273
bob
  • 421
  • 3
    A simple solution is to use \ before \begin{enumerate}. It would align (1) with the other items. – Guido Sep 23 '12 at 09:43
  • 2
    @Guido, I see it works. But that leaves a blank line. – bob Sep 23 '12 at 09:45
  • see http://tex.stackexchange.com/questions/46357/how-to-suppress-vertical-space-between-theorem-heads-and-enumitem-environments/46391#46391 and http://tex.stackexchange.com/questions/51701/amsthm-newtheoremstyle-headspace-mbox-and-lists/51710#51710 – David Carlisle Sep 23 '12 at 09:48
  • 1
    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 09:52

4 Answers4

39

The "official" AMS suggestion, presented in a FAQ entry, is to follow \begin{thm} with the command \leavevmode. this will leave the theorem header on a line by itself.

edit: the amsthm documentation has undergone a thorough revision. the new version (amsthdoc.pdf) is on ctan and will be included in tex live 2015. more "elaborate" possibilities are suggested for this situation in the updated manual.

  • Thanks! PS: It would be wonderful it it could be automated (and by default). Something like the following pseudocode: " if(enumerate or itemize follows \begin{environment}) then: insert \leavevmode " – Arnaud Feb 16 '24 at 10:49
10
\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}

enter image description here

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}
4
\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}

enter image description here

  • Thanks! Is it possible to reduce the distance between the theorem and the list? – bob Sep 23 '12 at 09: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 09: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. –  Sep 23 '12 at 10:05
  • @bob: for example \begin{thm}\hspace{-1em}\begin{mini...} –  Sep 23 '12 at 10:07
  • 1
    @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! –  Sep 23 '12 at 10:14
  • 2
    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
  • @Herbert When I add \usepackage[unicode,bookmarksnumbered]{hyperref} item is not in a line with theorem. How can I repair? – minthao_2011 Jul 05 '16 at 01:19
2
\begin{thm}
$\ $
\begin{enumerate}
\item Item 1
\item Item 2
\item Item 3
\end{enumerate}
\end{thm}

shows

Theorem 14. 
(1) Item 1
(2) Item 2
(3) Item 3
pushhhhh
  • 21
  • 2
  • 1
    The question asked to put (1) on the same line as the theorem header and align the next items below it, so this is not really an answer to the question. – Marijn Dec 12 '22 at 12:20