1

This question is about how to get rid of the white space in a theorem beginning with a list between the theorem caption and the first item:

\documentclass{article}

\usepackage{amsthm}
\usepackage{enumitem}

\theoremstyle{plain}
\newtheorem{theorem}{Theorem}

\begin{document}
    \begin{theorem}
        \begin{enumerate}
            \item First item.
            \item Second item.
            \item Third item.
        \end{enumerate}
    \end{theorem}
\end{document}

enter image description here

The behavior is described in the amsthm documentation:

enter image description here

The resulting output looks the way I want it (here I included some other customizations to produce an output which is close to what I want to use in my actual document):

\documentclass{article}

\usepackage{amsthm}
\usepackage{enumitem}

\theoremstyle{plain}
\newtheorem{theorem}{Theorem}

\newcommand{\firstitem}{\hangindent\leftmargini
    \textup{(\romannumeral1)}\hspace{\labelsep}\ignorespaces}

\setlist[enumerate]{label=\textup{(\roman{*})},itemsep=0pt,topsep=\smallskipamount}

\begin{document}
    \begin{theorem}
        \firstitem First item with more than one line. This is some blindtext to include a line break.
        \begin{enumerate}
            \setcounter{enumi}{1}
            \item Second item.
            \item Third item.
        \end{enumerate}
    \end{theorem}
\end{document}

enter image description here

However I don't really find this approach acceptable for the following reasons:

  • It breaks my work flow to type the item and set the counter manually.
  • It does not easily allow for global customization of lists, changing from arabic numbering to roman numbering for example, or changing the itemsep.
  • It does not without further work allow to \label the first list item in order to \ref it in the text.

So are there any solutions to obtain desirable formatting and without any of the negative side effects just described?

1

Just use the key wide=0pt. I added some other formatting, in particular, I think the enumerate labels should be upshape and the vertical skip between items should be smaller – but it's only my point of view.

\documentclass{article}

\usepackage{amsthm}
\usepackage{enumitem}

\theoremstyle{plain}
\newtheorem{theorem}{Theorem}
\newlist{thmenumerate}{enumerate}{1}
\setlist[thmenumerate, 1]{label=(\roman*), itemsep=0pt, widest=(iii), font=\upshape}

\begin{document}

    \begin{theorem}
        \begin{thmenumerate}[wide=-0.5pt, leftmargin=*, labelsep=0em]
            \item \mbox{}\hspace*{-1em}First item with more than one line. This is some blindtext to include a line break.
        \end{thmenumerate}
        \begin{thmenumerate}[resume, topsep = 0pt, align = right]
            \item Second item. Second item. Second item. Second item. Second item. Second item. Second item. Second item.
            \item Third item.
        \end{thmenumerate}
    \end{theorem}

\end{document} 

enter image description here

Another code to fulfil your requirements:

I define in the preamble a thmenumerate list, and one uses the resume key after rhe first item which has a different formatting:

\documentclass{article}

\usepackage{amsthm}
\usepackage{enumitem}

\theoremstyle{plain}
\newtheorem{theorem}{Theorem}
\newlist{thmenumerate}{enumerate}{1}
\setlist[thmenumerate, 1]{label = (\roman*), itemsep = 0pt, font=\upshape}

\begin{document}

    \begin{theorem}
        \begin{thmenumerate}[wide=0pt, leftmargin=*, widest=(iii), labelsep=-0.5em]
            \item First item with more than one line. This is some blindtext to include a line break. 
        \end{thmenumerate}
        \begin{thmenumerate}[resume*, topsep = 0pt ]
            \item Second item. Second item. Second item. Second item. Second item. Second item. Second item. Second item.
            \item Third item.
        \end{thmenumerate}
    \end{theorem}

\end{document} 

enter image description here

  • Thank you for your suggestion. Perhaps it did not become clear from my question but I only want to delete the space in front of the very first item in order to match the appearance of the official amsthm solution. In particular the next items should be indented as in a default list. I edited the question accordingly. I apologize for the misunderstanding. – John Dorian Apr 21 '18 at 9:36
  • And the hanging indent for multiline items contents? – Bernard Apr 21 '18 at 9:39
  • Yes, this should be included. I included an example in my question which produces an output that is very close to what I want to use in my actual document. And perhaps the needed code shows that it is not practical to use a non-automated approach to get it. – John Dorian Apr 21 '18 at 9:52
  • The idea with resume is good, because it allows the usage of \label (as opposed to my ad hoc solution in the question). But the indent of the first item is not yet correct (and I don't know how to fix that). – John Dorian Apr 21 '18 at 10:24
  • Could you explain in detail what you'd like to have? – Bernard Apr 21 '18 at 10:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.