I'm trying to list some code (package minted) inside a multicol (package multicol).
Example Code:
\documentclass{article}
\usepackage{minted}
\usepackage{multicol}
\begin{document}
\begin{multicols}{2}
This is a listing inside a multicolom:
\begin{listing}
\begin{minted}{sql}
SELECT * FROM table1
\end{minted}
\caption{Some random SQL Query}
\label{lst:sql}
\end{listing}
\end{multicols}
This is a listing outside the multicolums:
\begin{listing}
\begin{minted}{sql}
SELECT * FROM table2
\end{minted}
\caption{Some other random SQL Query}
\label{lst:sql2}
\end{listing}
\end{document}
Output:
Question:
The first listing is missing, as you can see. When not using minted inside the listing environment the code shows up, but without the needed chaption/label.
How can I use the minted listing environment inside a multicol with labels and chaptions?