Alterar a enumeração de números para alfabeto não funciona se eu editar manualmente o espaço entre os itens primeiro

Alterar a enumeração de números para alfabeto não funciona se eu editar manualmente o espaço entre os itens primeiro

Estou tentando alterar a enumeração de números para alfabeto. ou seja, em vez da lista

1.
2.
3. 

quero ter a lista

(a)
(b)
(c)

Para isso utilizo os seguintes comandos:

\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}

Se eu fizer da maneira acima, funciona.

Mas, quando quero alterar o espaço vertical entre os itens, da seguinte forma:

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

... não funciona.

Então, para ficar claro, essa combinação não funciona:

\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}

Alguém poderia me ajudar qual é a conexão entre esses dois comandos e por que o primeiro anula o segundo?

Obrigado,

Responder1

com enumitemvocê deve fazer isso:

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

para mudar alguma coisa globalmente.

Seu código:

\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}

insira a descrição da imagem aqui

Responder2

Seria mais útil postar um exemplo completo que demonstrasse o problema do que fragmentos que não podemos usar. Mas de qualquer forma você está usando (mas não disse) enumitemwhich define \enumerateprocurar um argumento opcional, mas então você define seu comando de forma que o comando seja sempre seguido por \setlengthpara que o argumento opcional não seja visto. Depois da sua definição é como se você tivesse ido

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

\itemsepDe qualquer forma, definir dentro da lista é o lugar errado, já que você está usando enumitem, você pode definir os parâmetros da lista dentro do argumento opcional.

informação relacionada