I have a two column document:
\documentclass[twocolumn]{elsarticle}
\usepackage{minted}
\usepackage{caption}
\captionsetup[listing]{position=top}
\usepackage{listings}
\begin{document}
\begin{listing}[H]
\begin{minted}[linenos=true, breaklines, breakafter=d, fontsize=\small]{java}
public class Line extends IShape {
/*...*/
}
\end{minted}
\caption{File Line.java}
\label{lst:example}
\end{listing}
\end{document}
I'm also using minted
for listings, but I want to show some of them into a single column while the document remains into two columns. I tried \begin{listing*}...\end{listing*}
, but it didn't work. Is there a simple way to achieve this? Thank you!
Best Answer
Use
listings*
; the code will be set at the top of a page (H makes no sense).