65

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.

1
  • Not sure why you want to use the \left[...\right] construct, but note that you need to be in math mode to use that so you can use the solutions below with [label={$\left[\arabic*\right]$}]. Jan 31, 2012 at 17:03

4 Answers 4

95

Use the enumitem package to format the enumerated list:

enter image description here

\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}
0
32

The enumerate Package wants you to put those brackets into a group

\documentclass{article}
\usepackage{enumerate}
\begin{document}

\begin{enumerate}[ {[}1{]} ]
\item first
\item second
\end{enumerate}

\end{document}
1
  • 1
    Work like charm without adding new packages, thx
    – SocoM
    Jul 1, 2016 at 3:11
26

Warning

For the sake of completeness, if you want to change the list format without loading any packages, you can redefine \labelenumi as:

\renewcommand*\labelenumi{[\theenumi]}

For deeper levels, just change the counter, i.e, i, ii, iii.

You might use in a local scope, otherwise this change will be reflected globally:

\documentclass{article}

% global change
\renewcommand*\labelenumi{[\theenumi]}

\begin{document}

\begin{enumerate}
\item Juventus
\item Milan
\item Udinese
\end{enumerate}

\end{document}

List

To use it locally, you might try:

\begin{enumerate}
\renewcommand*\labelenumi{[\theenumi]}
\item Juventus   % [1] Juventus
\item Milan      % [2] Milan
\item Udinese    % [3] Udinese
\end{enumerate}

\begin{enumerate}
\item Juventus   % 1. Juventus
\item Milan      % 2. Milan
\item Udinese    % 3. Udinese
\end{enumerate}

Again, don't do this, use a package instead. I'd go with either enumitem or enumerate. :)

3
  • @Thorsten: thanks! egreg suggested the text. :) Jan 31, 2012 at 13:10
  • @PauloCereda It's clear that text was suggested by a juventino: he forgot Inter!
    – CarLaTeX
    Dec 4, 2016 at 7:40
  • @PauloCereda Forget it, I haven't seen this is an old post, maybe it was the league table at that time and he's innocent hahaha!
    – CarLaTeX
    Dec 4, 2016 at 7:54
8
\begin{enumerate}
\item[{[1]}] First statement
\item[{[2]}] Second statement 
.
.
.
. 

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .