33

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}
4
  • 3
    A simple solution is to use \ before \begin{enumerate}. It would align (1) with the other items.
    – Guido
    Sep 23, 2012 at 9:43
  • 2
    @Guido, I see it works. But that leaves a blank line.
    – bob
    Sep 23, 2012 at 9:45
  • 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, 2012 at 9:52

4 Answers 4

38

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.

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}
1
  • When I add \usepackage[unicode,bookmarksnumbered]{hyperref} item is not in a line with theorem. How can I repair? Jul 5, 2016 at 1:19
3
\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

7
  • Thanks! Is it possible to reduce the distance between the theorem and the list?
    – bob
    Sep 23, 2012 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, 2012 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.
    – user2478
    Sep 23, 2012 at 10:05
  • 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!
    – user2478
    Sep 23, 2012 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, 2012 at 10:20
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
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, 2022 at 12:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .