# How to add space at the beginning of the item or adjust left alignment for items

Hi I use enumerate to number items but second item starts before the first one. Because i add more than one number in item, I didnt figure out how to make a space at the begining of an item. Do you know anything that i can fix this?

Here is my code:

\begin{enumerate}
\item[$1)$] First item,
\item[$2-5)$] 2 through 5 items,
\item[$6)$] 6th item.
\end{enumerate}


-
So you want 2 - 5) to be left justified with others? – pushpen.paul Jun 30 '14 at 3:50
yes or at least it can be justified with paragraph – tevzia Jun 30 '14 at 4:02

Here abox with a length is defined.

\def\abox#1{\leavevmode\hbox to 1cm{#1 \hfill}}         % left aligned
\def\abox#1{\leavevmode\hbox to 1cm{\hfill #1 \hfill}}  % center ligned


Code

\documentclass{article}

\begin{document}

----- Left aligned

\def\abox#1{\leavevmode\hbox to 1cm{#1 \hfill}}

\begin{enumerate}
\item[\abox{$1)$}] First item,
\item[\abox{$2-5)$}] 2 through 5 items,
\item[\abox{$6)$}] 6th item.
\end{enumerate}

----- Center aligned

\def\abox#1{\leavevmode\hbox to 1cm{\hfill #1 \hfill}}

\begin{enumerate}
\item[\abox{$1)$}] First item,
\item[\abox{$2-5)$}] 2 through 5 items,
\item[\abox{$6)$}] 6th item.
\end{enumerate}

\end{document}

-

I'd recommend using the enumitem package the option align=left does the job:

## Code:

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

\begin{document}
\begin{enumerate}[align=left]
\item[1)] First item,
\item[2--5)] 2 through 5 items,
\item[6)] 6th item.
\end{enumerate}
\end{document}

-
Your value makes the label begin in the left margin of the text (very slightly: ~ 2pt) as one may check with GSView or the latest versions of SumatraPDF. 2.28em would be a better value, but then the text of the items is not well aligned. – Bernard Jun 30 '14 at 8:20
@Bernard: Thanks for pointing that out. I have revised the solution so that the text does not go into the page margins. – Peter Grill Jul 28 '14 at 16:12

A variant of the preceding solution that ensures both text of the items being aligned, and labels being left aligned on the ambient left margin (or at a \parindent distance if you wish), and a minimally computed label width:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{fourier}
\usepackage[shortlabels]{enumitem}

\parindent = 1em

\begin{document}

Text text text text text text text text text text text text text text text text text text text text text text text text text text text.
\begin{enumerate}[ $1)$,align=left, widest = $2--5)$,labelsep* = 0.5em, leftmargin = *]
\item First item,
\item[$2-5)$] \setcounter{enumi}{5} $2$ through $5$ items,
\item 6th item.
\end{enumerate}

\textbf{With a label indent:}

Text text text text text text text text text text text text text text text text text text text text text text text text text text text.
\begin{enumerate}[ $1)$,align=left, widest = $2--5)$,labelindent = \parindent, labelsep* = 0.5em, leftmargin = *]
\item First item,
\item[$2-5)$] \setcounter{enumi}{5} $2$ through $5$ items,
\item 6th item.
\end{enumerate}

\end{document}


-