When I include a theorem-based environment right after the start of a list item, a linebreak is inserted that looks a little funny.
\documentclass{article}
\usepackage{amsthm}
\newtheorem{claim}{Claim}
\begin{document}
Problem:
\begin{enumerate}
\item First part of problem
\item Second part of problem
\end{enumerate}
Solution:
\begin{enumerate}
\item First part of solution
\item
\begin{claim}
Result X holds
\end{claim}
By Result X, the second part follows.
\end{enumerate}
\end{document}
The linebreak occurs after Item 2 of the solution, since theorem environments always start with a linebreak. Is there an alternative to a theorem environment that I should be using? I am looking for a solution that is as canonical as possible, and doesn't require tweaking lots of settings manually.
EDIT: While updating my code snippet to make it a MWE, I realized that omitting the \usepackage{amsthm}
fixes the problem. However, in my actual LaTeX document I would prefer to keep using amsthm.
claim
environment using theenumitem
package -- so something like\newlist{claim}{description}{1}
. Then you could set its parameters using\setlist
. Be good if you could add a MWE.