I'd like to use a custom floating environment for lstlistings so as to be able to draw frames around the listings using mdframed.
My float uses the same counter as lstlisting, and also appears in the List of Listings. However, the corresponding line in the List of Listings is not indented like the other lines are.
My Questions:
- Why is that?
- What can I do to make the entries for the custom float look the same?
Minimal example:
\documentclass[a4paper,oneside,article,final]{memoir}
\usepackage{listings}
\newfloat[chapter]{myfloat}{lol}{Listing}
\newlistentry{myfloat}{lol}{0}
\begin{document}
\lstlistoflistings
\chapter{Content}
\begin{lstlisting}[caption={A}]
A!
\end{lstlisting}
\begin{lstlisting}[caption={B}]
B!
\end{lstlisting}
\begin{myfloat}[b]
\begin{lstlisting}
C!
\end{lstlisting}
\caption{C}
\end{myfloat}
\end{document}
I'd post what it looks like (already made the screenshot), but apparently one needs 10 reputation to post images :/

mdframedfor listings. – Christoph Aug 14 '13 at 11:44