[Tex/LaTex] How to set leftmargin when using the enumerate package

indentationlists

Is it possible to set the leftmargin length when using the enumerate package? I'd like to limit the effect of leftmargin to a single environment invokation only and not set it globally.

Best Answer

I recommend the package enumitem. Here you can set leftmargin local.

 \documentclass{article}
 \usepackage{enumitem,showframe}

 \begin{document}
\begin{enumerate}[leftmargin=2cm]
\item foo
\item bar
\end{enumerate}

\begin{enumerate}[leftmargin=1cm]
\item foo
\item bar
\end{enumerate}

\begin{enumerate}
\item foo
\item bar
\end{enumerate}
\end{document}