5

I am trying to change enumeration from numbers to alphabet. i.e. instead of the list

1.
2.
3. 

I want to have the list

(a)
(b)
(c)

For this I use the following commands:

\documentclass[12pt, a4paper]{article}
\usepackage{setspace}
\setstretch{1}
\usepackage{mathtools}
\usepackage{enumitem}
\usepackage[ampersand]{easylist}
\usepackage[margin=2.5cm]{geometry}
\setlength{\topmargin}{-2cm}
\usepackage{titling}
\setlength{\droptitle}{0cm}
\usepackage{amsthm}
\usepackage{amsfonts}
\usepackage{amssymb}
\newtheorem{theorem}{Theorem}
\newtheorem{corollary}{Corollary}[theorem]
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{proposition}[theorem]{Proposition}
\theoremstyle{definition}
\newtheorem{definition}{Definition}[section]
\newtheorem{example}{Example}
\theoremstyle{remark} 
\newtheorem*{solution}{Solution}
\newtheorem*{remark}{Remark}
\title{\textbf{Metric Spaces} \vspace{-0.5cm}}

\begin{document}
\maketitle

\section{Basic Topology}
    \begin{definition} %\parskip0pt \parsep0pt
    A set $X$ together with a real-valued function $d$ is called a metric space if for all $x, y, z, \in X,$ the following properties are satisfied:

    \usepackage{enumitem}

    %%This command creates list.
    \begin{enumerate}[label=(\alph*)]
    \item $ d(x,x)=0$
    \item $ d(x,y)>0 if x \neq y $
    \item $ d(x,y)=d(y,x) $
    \item $ d(x,y) \leq d(x,z)+d(z,y) $
    \end{enumerate}

If I do in the way above it works.

But, when I want to change vertical space between items, in the following way:

\let\oldenumerate\enumerate\renewcommand{\enumerate}{\oldenumerate\setlength{\itemsep}{3pt}\setlength{\parskip}{0pt}\setlength{\parsep}{0pt}}

... it does not work.

So, to be clear this combination does not work:

\documentclass[12pt, a4paper]{article}
\usepackage{setspace}
\setstretch{1}
\usepackage{mathtools}
\usepackage{enumitem}
\usepackage[ampersand]{easylist}
\usepackage[margin=2.5cm]{geometry}
\setlength{\topmargin}{-2cm}
\usepackage{titling}
\setlength{\droptitle}{0cm}
\usepackage{amsthm}
\usepackage{amsfonts}
\usepackage{amssymb}
\newtheorem{theorem}{Theorem}
\newtheorem{corollary}{Corollary}[theorem]
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{proposition}[theorem]{Proposition}
\theoremstyle{definition}
\newtheorem{definition}{Definition}[section]
\newtheorem{example}{Example}
\theoremstyle{remark} 
\newtheorem*{solution}{Solution}
\newtheorem*{remark}{Remark}
\title{\textbf{Metric Spaces} \vspace{-0.5cm}}
\let\oldenumerate\enumerate\renewcommand{\enumerate}{\oldenumerate\setlength{\itemsep}{3pt}\setlength{\parskip}{0pt}\setlength{\parsep}{0pt}}


\begin{document}
\maketitle

\section{Basic Topology}
    \begin{definition} %\parskip0pt \parsep0pt
    A set $X$ together with a real-valued function $d$ is called a metric space if for all $x, y, z, \in X,$ the following properties are satisfied:

    \usepackage{enumitem}

    %%This command creates list.
    \begin{enumerate}[label=(\alph*)]
    \item $ d(x,x)=0$
    \item $ d(x,y)>0 if x \neq y $
    \item $ d(x,y)=d(y,x) $
    \item $ d(x,y) \leq d(x,z)+d(z,y) $
    \end{enumerate}

Could anyone help me what is the connection between these two commands and why the first nullifies the second one?

Thanks,

3

with enumitem you should do this:

\setlist[enumerate,1]{itemsep=10pt}

to change some thing globally.

Your code:

\documentclass[12pt, a4paper]{article}
\usepackage{mathtools}
\usepackage{enumitem}
\usepackage{amsthm}
\usepackage{amsfonts}
\usepackage{amssymb}
\newtheorem{theorem}{Theorem}
\newtheorem{corollary}{Corollary}[theorem]
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{proposition}[theorem]{Proposition}
\theoremstyle{definition}
\newtheorem{definition}{Definition}[section]
\newtheorem{example}{Example}
\theoremstyle{remark}
\newtheorem*{solution}{Solution}
\newtheorem*{remark}{Remark}
\title{\textbf{Metric Spaces} \vspace{-0.5cm}}
\setlist[enumerate,1]{itemsep=10pt}
\setlength{\parskip}{0pt}\setlength{\parsep}{0pt}


\begin{document}
\maketitle

\section{Basic Topology}
    \begin{definition} %\parskip0pt \parsep0pt
    A set $X$ together with a real-valued function $d$ is called a metric space if for all $x, y, z, \in X,$ the following properties are satisfied:

    %%This command creates list.
    \begin{enumerate}[label=(\alph*)]
    \item $ d(x,x)=0$
    \item $ d(x,y)>0 if x \neq y $
    \item $ d(x,y)=d(y,x) $
    \item $ d(x,y) \leq d(x,z)+d(z,y) $
    \end{enumerate}
\end{definition}
\end{document}

enter image description here

4

It would be more useful to post complete example that demonstrates the problem rather than fragments we can not use. But anyway you are using (but haven't said) enumitem which defines \enumerate to look for an optional argument, but then you define your command such that the command is always followed by \setlength so the optional argument is not seen. After your definition it is as if you had gone

\begin{enumerate}\setlength{\itemsep}{3pt}[label=(\alph*)]

Setting \itemsep inside the list is in any case the wrong place, since you are using enumitem you can set the list parameters within the optional argument.

  • Sorry for incomplete question. I edited it (copied all my document) now. \itemsep is anyways turned off. I do not use it. If not defining new command how can I change vertical spaces between item globally in the whole document and at the same time use original \enumeratecommand that comes to enumitem package? Thank you for such a prompt answer. Appreciated! – G.T. Apr 22 '15 at 19:31
  • 2
    @G.T. texdoc enumitem should show the documentation of the enumitem package. Section 5 Global Settings details how to change the defaults. – David Carlisle Apr 22 '15 at 20:36

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.