0

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:

enter image description here

3

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}

enter image description here

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}

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.