How to set the left margins of enumerate items and itemizes items separately in global ways?
I recommend using the enumitem package whenever you want to customise list environments. Using it you can set up different default behaviours for each list environment using \setlist
- and even different behaviours for the different levels of nesting. For example, with
\setlist[enumerate]{leftmargin=10mm, label=\alph*)}
\setlist[itemize]{leftmargin=20mm}
For your desired output, with labels (1)
, (2)
, ... you do not need the label=\alph*)
and can just use
\setlist[enumerate]{leftmargin=10mm}
with whatever margin you would like. You can also define new list environments with commandslike
\newlist{mylist}{enumerate}{3}
\setlist[mylist]{...}
See the enumitem
documentation for more details.
Here is the full code for the MWE above:
\documentclass{amsart}
\usepackage{enumitem}
\setlist[enumerate]{leftmargin=10mm, label=\alph*)}
\setlist[itemize]{leftmargin=20mm}
\begin{document}
\begin{enumerate}
\item maybe
\item maybe
\item maybe
\end{enumerate}
\begin{itemize}
\item maybe
\item maybe
\item maybe
\end{itemize}
\end{document}
Related videos on Youtube
M. Logic
Updated on September 23, 2020Comments
-
M. Logic about 3 years
A minimal working sample is as follows:
\documentclass{amsart} \begin{document} \begin{enumerate} \item maybe \item maybe \item maybe \end{enumerate} \begin{itemize} \item maybe \item maybe \item maybe \end{itemize} \end{document}
Goal: I hope that the left margin of enumerate items is 0, and also the left margin of itemize items is 0. I use the left margin for the space between the labels and left line of the type area.
Question: Are there global ways for theses? I know
\setlength{\leftmargini}{ }
can do it, but if we set up with that left margin of enumerate items as 0, then the left margin of itemize items can't be with that set up as 0.The effect what I need is as follows: