I want to make a "List of Algorithms and Listings" that contains both listings made with \begin{lstlisting}... (listings package) and algorithms \begin{algorithm}... (algorithm2e package).
I also want the numbering to be continuous in the List of..., no matter how I alternate between listings and algorithms.
I have tried to use the listings package to make the List of... and to put something like \addcontentsline{lol}{section}{\numberline {\thelstlisting}This is a test} after \end{algorithm}, but that entry does not get properly numbered.
10x.