# How can I caption an enumerated list?

When I have a list such as

\begin{enumerate}
% List contents here...
\end{enumerate}


Or

\begin{itemize}
% List contents here...
\end{itemize}


How can I caption it, eg. as "List 1.1"? I could put it inside a table environment, but then the caption would say "Table 1.1", and this isn't a table.

• do you want the environment to float? May 27 '14 at 2:25
• @cmhughes No, but I'd prefer to have an answer for either option. May 27 '14 at 3:46
• ok, I'll update my answer later today May 27 '14 at 16:18
• I've updated my answer to include a non-floating example at the end May 28 '14 at 4:10

Here's one way that you can do it using the newfloat package.

Notice that it is completely compatible with the caption and hyperref package, and that it provides the command

\listofmyfloats


to give a list of your floats.

% arara: pdflatex
\documentclass{article}
\usepackage{newfloat}
\usepackage{caption}
\DeclareFloatingEnvironment[fileext=cmh,placement={!ht},name=List]{myfloat}

\captionsetup[myfloat]{labelfont=bf}
\usepackage{lipsum}

\newenvironment{listenv}[1]
{\begin{myfloat}[tb]
\begin{enumerate}
\caption{#1}
}
{\end{enumerate}\end{myfloat}
}

\begin{document}

\listofmyfloats
\begin{listenv}{More details}\label{list1}
\item one
\item two
\item three
\end{listenv}

See list \ref{list1} or figure \ref{fig1}.

\begin{figure}
\caption{A real figure}\label{fig1}
\end{figure}

\end{document}


If you want a non-floating version, you can tweak this to, for example,

\newenvironment{nonfloatlistenv}[1]{%
\center
\captionof{myfloat}{#1}
\enumerate
}
{\endenumerate\endcenter}


and then

\begin{nonfloatlistenv}{Non floating}\label{list1}
\item one
\item two
\item three
\end{nonfloatlistenv}


Tweak this how you see fit.

• The demonstration looks quite complex, could you please explain the different parts and add some comments? Jun 2 '14 at 20:50
• Also, this labels my lists incorrectly. I expect my lists in section n to be labeled List n.1, List n.2, and so on. Your MWE labels it List 1 no matter how many sections I add. Jun 2 '14 at 20:59
• @Superbest sounds like you want to use the \numberwithin command Jun 2 '14 at 23:29