25

When we use the enumerate environment, there's an indent created as you can see in the picture:

enter image description here

Is there a way to remove that indent so that everytime I use the enumerate stuff doesn't give me such indent?

33

It is not entirely clear whether you want to eliminate the indentation entirely or whether you want the items to be indented but not the labels. A.Ellett interpreted your question in one way and I in another.

Here's my answer based on my interpretation. This takes it that you want to eliminate the indentation entirely so that the list is like a series of numbered paragraphs.

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

\begin{document}
  \kant[1]
  \begin{enumerate}[wide, labelwidth=!, labelindent=0pt]
    \item \kant[2]
    \item \kant[3]
    \item \kant[4]
    \item \kant[5]
  \end{enumerate}
  \kant[6]
\end{document}

tweaked enumeration

  • wide is a convenience style for non-indented lists which are paragraph-like.

More specifically (page 8 of the manual), this key is equivalent to setting

align=left, leftmargin=0pt, labelindent=\parindent, listparindent=\parindent, labelwidth=0pt, itemindent=!

That is, align the label left within the label box, set the leftmargin to zero, indent labels and paragraphs by \parindent, set the width of labels to zero and calculate an appropriate indentation for items based on the other values.

We then tweak this by overriding some of the settings used by wide:

  • labelindent=0pt (overriding the value set by wide) says not to indent the label relative to the left margin.
  • labelwidth=! tells enumitem to calculate the appropriate width for the label (again overriding the value set by wide).

Alternatively, the following is based on A.Ellett's interpretation which understood you to want indented items but non-indented labels:

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

\begin{document}
  \kant[1]
  \begin{enumerate}[leftmargin=*]
    \item \kant[2]
    \item \kant[3]
    \item \kant[4]
    \item \kant[5]
  \end{enumerate}
  \kant[6]
\end{document}

tweaked enumeration

  • leftmargin=* calculates an appropriate value for leftmargin based on the current label.
  • Perhaps you might add the details about using leftmargin=*. – A.Ellett May 3 '15 at 19:22
  • You make me laugh. I appreciate the gesture. But your answer was more thorough than mine. All yours. I think it's funny how we're simultaneously working on the same problems. – A.Ellett May 3 '15 at 19:25
  • @A.Ellett You were first by 23 seconds. If anybody should delete, I should! But the answers were different and I thought it might be useful to have screenshots for both. I tried to leave you a comment suggesting you rollback if you objected but the system wouldn't let me because you'd deleted the answer. – cfr May 3 '15 at 19:28
  • How can I change numbering into bullet ? @cfr – alper Aug 12 '18 at 21:22
6

enter image description here

\documentclass[12pt,a4paper]{article}
\usepackage{enumitem}
\usepackage[showframe]{geometry}
\begin{document}

\begin{enumerate}[leftmargin=2cm]
\item first item here
\item second item here
\item third item and so on ...
\end{enumerate}

\begin{enumerate}[leftmargin=*]
\item first item here
\item second item here
\item third item and so on ...
\end{enumerate}

\begin{enumerate}
\item first item here
\item second item here
\item third item and so on ...
\end{enumerate}

\end{document}

As you can see, you can control the indentation value by specifying an option [leftmargin=<length>]. If you need it to be zero, just choose the [leftmargin=*] option. Sure you need to add \usepackage{enumitem} in the preamble.

You can get the customization you want by setting the [key=value] option for a number of keys. For example, for horizontal spacing, one can set the keys:

  • leftmargin
  • rightmargin
  • listparindent
  • labelwidth
  • labelsep
  • itemindent

For vertical spacing, one can set the keys:

  • topsep
  • partopsep
  • parsep
  • itemsep

You can refer to the enumitem package documentation for more details.

0

Here is how you can do it without enumitem or other packages (hyperref is loaded only to test cross references and lipsum to fill the items with dummy text).

Works with or without indented items in the same environment. As bonus point the items are capitalized:

MWE

\documentclass{article}
\usepackage[colorlinks]{hyperref}
\usepackage{lipsum}

\newcounter{num}
\def\Num{\par\medskip\refstepcounter{num}{\bfseries\arabic{num}}.\hspace{1em}\MakeUppercase}
\def\num{\par\medskip\refstepcounter{num}\hangindent2em{\bfseries\arabic{num}}.\hspace{1em}\MakeUppercase}
\newenvironment{Numera}
{\parindent0pt\par\medskip}
{\setcounter{num}{0}\par\bigskip}

\begin{document}
\noindent Some text before. Go to item \ref{last}.
\begin{Numera}
\Num item one. \lipsum[2] \label{one}     
\Num another item. \lipsum[6]
\num indented item. \lipsum[7]     
\num one more item. \lipsum[11]\label{last} 
\end{Numera}
\noindent Some text after. Go to item \ref{one}.
\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.