The minted package for code highlighting comes with a float environment called listing. Now I would like to place two of this code listings next to each other, but I have no idea how to do this. I tried using the multicol package, but code of the two listings overlapped.
Any suggestions on how to do this?
EDIT: Here is some little macro I created for convenience and an example on its usage.
\newcommand{\insertminted}[2]{\inputminted[linenos=true,
frame=lines,
framesep=2mm,
xleftmargin=2cm,
xrightmargin=2cm]{#1}{#2}}
\begin{listing}[H]
\insertminted{xml}{code_examples/user.xml}
\insertminted{js}{code_examples/user.js}
\caption{SomeCaption}
\label{lst:representation_examples}
\end{listing}
This way the code of user.xml is above the code of user.js. What I would like to have is the code next to each other in two cols, so that it can be compared. I also would like to have a seperate caption for each of them. The listing as a whole should appear in the output of \listoflistings.


\documentclassand the appropriate packages so that those trying to help don't have to recreate it. – Peter Grill Nov 30 '11 at 22:49minipages? – Peter Grill Nov 30 '11 at 23:02