Friends, consider the following code:
\documentclass{article}
\usepackage{graphicx}
\usepackage{lipsum}
\begin{document}
\listoffigures
\newpage
\lipsum[2]
\begin{figure}[h]
\centering
\includegraphics{imgs/shark.png}
\caption{A shark.}
\label{fig:shark}
\end{figure}
\lipsum[2]
\begin{figure}[h]
\centering
\includegraphics{imgs/duck.png}
\caption{A duck.}
\label{fig:duck}
\end{figure}
\lipsum[2]
\begin{figure}[h]
\centering
\includegraphics{imgs/elephant.png}
\caption{An elephant.}
\label{fig:elephant}
\end{figure}
\lipsum[2]
\end{document}
Basically, I have some text and three figures, as seen in the output:

I also have a \listoffigures:

I was wondering if it's possible to create lists of figures based on groups. For instance, group those animals by their habitat:
First list of figures
Animals that live in water
1 . A shark. ................. 2
Second list of figures
Animals that live in land
2 . A duck. ................. 2
3 . An elephant. ........ 2
I'm also wondering if it's possible to have intersections, e.g., the duck could be in both lists. I was thinking if there is some magical command like this:
...
\magicalcommandhere{water}
\includegraphics{imgs/shark.png}
...
\magicalcommandhere{water,land}
\includegraphics{imgs/duck.png}
...
\magicalcommandhere{land}
\includegraphics{imgs/elephant.png}
...
\magicallist{water}
\magicallist{land}
...
I was thinking on the float package for my first attempt, but I'm not sure if it's the right choice.
Any ideas?
