[Tex/LaTex] Custom enumerate text is not left aligned

#enumerateenumitem

I have a list that I am generating using the enumerate environment and the enumitem package, so that I can specify custom text before the counter: Step 1, Step 2, etc. For some reason the text shows up out in the left-hand margin rather than being left-aligned (or indented) with the rest of the document as I would have expected. In other words, it seems to just keep the item number in the same horizontal location and tack on the text to the left so that it sticks out into the margin:

enter image description here

I would have expected the list to instead shift to the right so that the text "Step" started where the "1." would have started. How do i fix this behavior?

Here is a MWE:

\documentclass[]{article}

\usepackage{enumitem}
\usepackage{lipsum}

\begin{document}

\lipsum[1]
\begin{enumerate}[label=\bfseries Step \arabic*:]
\item Sample ...
\item Map from ...
\item Compute texture dependent properties...
\item Map ... 
\item Compute ...
\item Define ...
\end{enumerate}

\end{document}

Best Answer

The labels are set up so that they end a certain distance from the text, so your labels are sticking out into the left margin because they are quite "wide". You can fix this by adding leftmargin=* to arguments of your enumerate environment. This makes the items line up with the left left-margin.

Edit If, in addition, you want the items indented a "standard" amount (which, from the manual seems to be 1em) you can do this but setting labelindent=1em.:

enter image description here

Here's your full code:

\documentclass[]{article}

\usepackage{enumitem}
\usepackage{lipsum}

\begin{document}

\lipsum[1]
\begin{enumerate}[label=\bfseries Step \arabic*:,leftmargin=*,labelindent=1em]
\item Sample ...
\item Map from ...
\item Compute texture dependent properties...
\item Map ...
\item Compute ...
\item Define ...
\end{enumerate}

\end{document}