5

What I want to achieve is very similar to this question, but the solution offered seems not to work in precisely the cases I need it to work! I'm placing enumerate and itemize environments inside a theorem, definition, proposition, or example environment, and I want the first item to be in a new line after the label.

Here's a working example with multiple situations I have so far.

\documentclass{article}
\usepackage{amsthm}

\theoremstyle{plain}
\newtheorem{theo}{Theorem}%          Regular theorem env.

\newtheoremstyle{break}% name
  {\topsep}%   Space above, empty = `usual value'
  {\topsep}%   Space below
  {\itshape}%  Body font
  {}%          Indent amount (empty = no indent, \parindent = para indent)
  {\bfseries}% Thm head font
  {.}%         Punctuation after thm head
  {\newline}%  Space after thm head: \newline = linebreak
  {}%          Thm head spec
\theoremstyle{break}
\newtheorem{enumtheo}{NTheorem}%    Theorem env. for lists

\begin{document}

\begin{theo}[No list with theo environment]
A little bit of text.
\end{theo}

\begin{enumtheo}[No list with enumtheo environment]
A little bit of text.
\end{enumtheo}

\begin{theo}[List with theo environment]
\begin{enumerate}
\item A little bit of text.
\item A little bit of text.
\end{enumerate}
\end{theo}

\begin{enumtheo}[List with enumtheo environment]
\begin{enumerate}
\item A little bit of text.
\item A little bit of text.
\end{enumerate}
\end{enumtheo}

\begin{enumtheo}[List with enumtheo environment and a newline]$ $\newline
\begin{enumerate}
\item A little bit of text.
\item A little bit of text.
\end{enumerate}
\end{enumtheo}

\end{document}

The output is the following: enter image description here

I want something like NTheorem 3 but without the horrible gap. NTheorem 2 should have worked as intended, but apparently the enumerate environment messes it up and disables the linebreak.

I don't mind having to create an alternate environment for theorems, definitions, examples, and propositions, but I also want to have different labels for items (e.g. numbers, letters, itemize,...), so ideally there would be a solution that wouldn't involve creating over 4*3 different custom environments.

2

1 Answer 1

13

Why don't you simply go for something like that?

\documentclass{article}
\usepackage{amsthm}

\theoremstyle{plain}
\newtheorem{theo}{Theorem}%  Regular theorem env.

\begin{document}

\begin{theo}[List in the Theorem environment]~ %%% <-  Note that space!
\begin{enumerate}
\item A little bit of text.
\item A little bit of text.
\end{enumerate}
\end{theo}

\end{document}

enter image description here

2
  • Wow. That is literally the shortest solution to a problem I have ever seen! What is the ~ supposed to do? I think I might add a \vspace{-\topsep} after the tilde just to remove that minor gap, but I can't believe the solution was that simple.
    – Martim
    Nov 20, 2015 at 19:29
  • 2
    It's just an unbreakable space. I don't know for the theory, but to me it's just "make that line non-empty, so that when I start a list, you have to start it on a new line". Otherwise LaTeX would start the list on the very same line, which is what you are trying to avoid. It was a one character answer ;-).
    – Clément
    Nov 20, 2015 at 19:33

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