# [Tex/LaTex] Enumerated list with square brackets

#enumeratebracketslists

I want to make an enumerated list in the following format:

[1] foo foo
[2] foo foo
...


How I can do that using enumerated lists? I have tried the following:

\begin{enumerate}[\left[ 1 \right]]


but it does not work.

Use the enumitem package to format the enumerated list:

\documentclass{article}
\usepackage{enumitem}% http://ctan.org/pkg/enumitem
\begin{document}
\begin{enumerate}[label={[\arabic*]}]
\item First item
\item Second item
\item \ldots
\item Last item
\end{enumerate}
\end{document}


Note that you are required to encase the optional argument in braces {...} since it contains square brackets; used in general for optional arguments and would otherwise "confuse" LaTeX.

If you want to make a global setting to your list (rather than the optional argument on a per-list basis), you can use

\setenumerate[1]{label={[\arabic*]}} % Global setting


or you could make your own list using

\newlist{mylist}{enumerate}{1}%
\setlist[mylist]{label={[\arabic*]}}%


which would allow you to use

\begin{mylist}
...
\end{mylist}