From what I understand, there is some big difference between listing and figure. While I have not quite figured out what the differences are, I understand that I should not use them interchangeably.
Given that, how do I create a grid of multiple independent pieces of code, but as part of on overarching listing caption, similar to using subfigure to create a grid of figures?
Bonus question: What should I use in case I want to mix pictures and code (i.e. "sublisting" and subfigure)?
Specifically: I am using minted, the listing environment and acmart.
E.g., I want to arrange the following in a 2x2 grid:
\begin{listing}[thp]
\caption{...}
\begin{minted}
code1
\end{minted}
\end{listing}
\begin{listing}[thp]
\caption{...}
\begin{minted}
code2
\end{minted}
\end{listing}
\begin{figure}[h]
\includegraphics{pic1}
\caption{...}
\end{figure}
\begin{figure}[h]
\includegraphics{pic2}
\caption{...}
\end{figure}
listingintofigureandsubfigure, and from what I understand, you are not supposed to putlistingsintofigures. – Domi Feb 10 '22 at 13:56