2

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.

lockstep
  • 250,273
  • 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 06 '14 at 07:12

1 Answers1

4
\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.

rittwik
  • 136
  • 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 06 '14 at 07:19
  • Added leftmargin=2cm as @Jesse suggested. – rittwik Feb 06 '14 at 08: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 06 '14 at 08:24
  • I've edited your example to include the instruction \setcounter{section}{1}, so as to make the definition show up as in the OP's preferred style – Mico Feb 06 '14 at 09:01
  • As to the eye, the most important is the distance from the document's leftmargin to the label, I suggest to use the capabilities of enumitem and replace leftmargin=2cm with labelindent=somevalue,leftmargin=!. This way, the enumerate left margin is calculated from the other parameters. For instance,one might take leftmargin=\parindent if it is not fixed to 0 in the document. – Bernard Feb 06 '14 at 09:43