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.

The code what I've got:

\documentclass[a4paper]{article}
\usepackage{amsthm}

\begin{document}

\textbf{Definition 1.1} The definition contains following contents:
\begin{enumerate}
  \item The first item
  \item The second item
  \item This item may long enough to take up more than a line like this sentence. Line Breaking \ldots
\end{enumerate}

\end{document}

Result of this code:

enter image description here

The result what I want:

enter image description here

The things have to be changed: space between lines, item format.

share|improve this question
3  
Hello, welcome to TeX.sx! :) Using the enumitem package, you can customize the enumerate environment to look like that, say, with \setlist[enumerate]{label*=(\arabic*),itemsep=0ex,parsep=0ex}. IMHO, since this change is global and affects all enumerate environments you might have throughout the whole document, it would be wiser to create a new list based on enumerate (the enumitem package also offers you this feature, via \newlist). –  Paulo Cereda Feb 6 at 7:12
add comment

1 Answer

up vote 4 down vote accepted
\documentclass[a4paper]{article}
\usepackage{amsthm}
\usepackage{enumitem}% http://ctan.org/pkg/enumitem

\theoremstyle{definition}
\newtheorem{definition}{Definition}[section]

\begin{document}
\setcounter{section}{1} % just for this MWE...
\begin{definition}
The definition contains following contents:
\begin{enumerate}[label=(\arabic*),leftmargin=2cm,itemsep=0ex,parsep=0ex]
  \item The first item
  \item The second item
  \item This item may long enough to take up more than a line like this sentence. Line Breaking \ldots
\end{enumerate}
\end{definition}

\end{document}

You may consider this Answer.

share|improve this answer
    
You might consider adding \setlist{nolistsep} to the preamble here to obtain the desired spacing as well. See also @Paul Cereda comment on \newlist in case these changes are not required globally. Also: Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. –  Paul Gessler Feb 6 at 7:19
    
Thanks @PaulGessler for the tips –  rittwik Feb 6 at 7:27
    
Added leftmargin=2cm as @Jesse suggested. –  rittwik Feb 6 at 8:08
2  
Since the amsthm package is already being loaded, it would be a good idea to (i) also issue the commands \theoremstyle{definition} and \newtheorem{definition}{Definition}[section] in the preamble and (ii) use the commands \begin{definition} and \end{definition} inside the body of the document to denote the scope of a definition. This would help improve/clarify the logical structure of the document, while obviating the need to engage in visual formatting (à la \textbf{Definition 1.1}). –  Mico Feb 6 at 8:24
    
Updated. Thanks @Mico. –  rittwik Feb 6 at 8:53
show 2 more comments

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.