I am using the subfloat
package to group related figures; they show up like 1a, 1b, etc. in the List of Figures.
Now, I want to define a new listing
float using the newfloat
package, which generates its own List of Listings.
Alas, I am lacking something like a sublistings
environment, which causes the listings to be labelled 1a, 1b, etc. as well:
\documentclass{article}
\usepackage[countmax]{subfloat}
\usepackage{newfloat}
\DeclareFloatingEnvironment{listing}
\begin{document}
\listoflistings
\begin{sublistings}
\begin{listing}
\caption{First listing}
\end{listing}
\begin{listing}
\caption{Second listing}
\end{listing}
\end{sublistings}
\end{document}
As far as I can see, the subfloat
package has support for subfigures
and subtables
only.
I wasn't able to copy & modify its code to produce a sublistings
environment that works with the float defined by newfloat
. Can anyone help me out?