Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Consider the following example:

\documentclass{article}
\newtheorem{Theorem}{Theorem}
\begin{document}
\begin{Theorem}
On the other hand, this one has only one claim.
\end{Theorem}
\begin{Theorem}
\begin{enumerate}
\item First claim
\item Second claim
\end{enumerate}
\end{Theorem}
\end{document}

Typesetting it results in:

enter image description here

Notice there is extra horizontal space before the first item in the list of the second theorem.

Is there a sensible way to get rid of that?

Ideally, the solution would work with amsthm, thmtools, enumitem.

N.B.: this is related to Is it possible to skip the first line in a theorem environment? but not quite the same.

share|improve this question
    
@Martin: the plus signs meant something different than your commas :) –  Mariano Suárez-Alvarez May 5 '11 at 9:22
    
Sorry, I didn't saw that. The main edit was the formatting of the package name with back-ticks `. Feel free to put the +s back in. –  Martin Scharrer May 5 '11 at 9:24
add comment

4 Answers 4

Two variants of a solution using the enumitem package. In the first case, two enumerate environments were used; the first one uses leftamargin=* to suppress the undesired horizontal space; the second enumerate uses resume to keep the numbering but preserves the standard value for \leftmargin; the vertical spacing between the two environments was also corrected. In the second case, the option leftmargin=* was also used, but this time only one enumerate environment was used so the horizontal space will be removed for all the items.

\documentclass{article}
\usepackage{enumitem}

\newtheorem{Theorem}{Theorem}

\begin{document}

\begin{Theorem}
   On the other hand, this one has only one claim.
\end{Theorem}

\begin{Theorem}
  \begin{enumerate}[leftmargin=*]
    \item First claim
  \end{enumerate}\vspace*{-2\partopsep}
  \begin{enumerate}[resume]
    \item Second claim
  \end{enumerate}
\end{Theorem}

\begin{Theorem}
   On the other hand, this one has only one claim.
\end{Theorem}

\begin{Theorem}
  \begin{enumerate}[leftmargin=*]
    \item First claim
    \item Second claim
  \end{enumerate}
\end{Theorem}

\end{document}

The result:

share|improve this answer
add comment

You can use a \@labels trick (as in Phil Hirschhorn's answer to “Avoiding a line break at the beginning of an enumerate”). Here's the result:

Image of the result of the code

There are two ways you can use this. The first is by manually putting a \thmenumhspace{-1em} before each \begin{enumerate} inside a theorem:

\documentclass{article}
%\usepackage{amsthm,enumitem,thmtools}% works with or without
\newtheorem{Theorem}{Theorem}
\makeatletter
\newcommand{\thmenumhspace}[1]{\sbox{\@labels}{\unhbox\@labels\hskip#1}}
\makeatother
\begin{document}
\begin{Theorem}
On the other hand, this one has only one claim.
\end{Theorem}
\begin{Theorem}\thmenumhspace{-1em}
\begin{enumerate}
\item First claim
\item Second claim
\end{enumerate}
\end{Theorem}
\end{document}

With a little more work, this can be automated, hopefully without any side effects (this time, you need amsthm for it to work correctly):

\documentclass{article}
\usepackage{amsthm,enumitem,thmtools}% needs amsthm
\newtheorem{Theorem}{Theorem}
\makeatletter
\newcommand{\thmenumhspace}[1]{\sbox{\@labels}{\unhbox\@labels\hskip#1}}
\let\original@item\item
\newcommand{\RedefineItem}{%
  \def\item{\let\item\original@item\thmenumhspace{-1em}\original@item}
}
\let\original@Theorem\Theorem
\def\Theorem{
   \@ifnextchar[{\Theorem@Opt}
                {\Theorem@NoOpt}
}
\def\Theorem@Opt[#1]{%
   \@ifnextchar\begin{\RedefineItem\original@Theorem[#1]}%
                     {\original@Theorem[#1]}%
}
\def\Theorem@NoOpt{%
   \@ifnextchar\begin{\RedefineItem\original@Theorem}%
                     {\original@Theorem}%
}
\makeatother
\begin{document}
\begin{Theorem}
On the other hand, this one has only one claim.
\end{Theorem}
\begin{Theorem}
\begin{enumerate}
\item First claim
\item Second claim
\end{enumerate}
\end{Theorem}
\begin{Theorem}
On the other hand, this one has only one claim.
\begin{enumerate}
\item First claim
\item Second claim
\end{enumerate}
\end{Theorem}
\begin{Theorem}[Title]
\begin{enumerate}
\item First claim
\item Second claim
\end{enumerate}
\end{Theorem}
\begin{Theorem}[Title]
On the other hand, this one has only one claim.
\begin{enumerate}
\item First claim
\item Second claim
\end{enumerate}
\end{Theorem}
\end{document}
share|improve this answer
add comment

I found this trick that might help:

\documentclass{article}
\newtheorem{Theorem}{Theorem}
\begin{document}
\begin{Theorem}
On the other hand, this one has only one claim.
\end{Theorem}
\begin{Theorem}
\mbox{}
\begin{itemize}    
\item[(i)] item one.    
\item[(ii)] item two.    
\item[(iii)]  item three.    
\end{itemize}
\end{Theorem}
\end{document}
share|improve this answer
    
That is mentioned in the question I linked to, but does not do what I want because it starts a new line. I would like the list to start right beside the Theorem 2, but without the unnecessary space. –  Mariano Suárez-Alvarez May 5 '11 at 9:41
1  
How is it unnessary? That is the default space between items in a list, that has nothing to do with theorems. If you whant to be able to configure this, see the enumitem package –  daleif May 5 '11 at 9:43
1  
@daleif: well, I consider it unnecessary to add extra horizontal space between the end of the Theorem 2 text and the label of the first item in the list: it is inb that way that it is unnecessary! Also «see the enumitem package» does in no way help me... I have already seen it —I have been using for years now…— and I would not be asking if I knew how to achieve the effect I want to achieve. If you read the other answers, you'll notice that it is quite not a matter of using the please-mariano option to enumitem, too. –  Mariano Suárez-Alvarez May 5 '11 at 17:01
    
@mariano ahh, then I misunderstood, I was thinking vertical –  daleif May 5 '11 at 22:28
add comment

You can hack a bit the first \item as follows:

\documentclass{article}
\newtheorem{Theorem}{Theorem}
\newcommand*\fixitem {\item[]%
  \refstepcounter{enumi}\hskip-\leftmargin\labelenumi\hskip\labelsep}
\begin{document}
\begin{Theorem}
On the other hand, this one has only one claim.
\end{Theorem}
\begin{Theorem}
\begin{enumerate}
\fixitem First claim
\item Second claim
\end{enumerate}
\end{Theorem}
\end{document}

and the result is:

result of tex run

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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