# Scale Listing inside figure

I'm writing a seminar paper about a Client-Server Application and I try to include the code I implemented. I do so with

\begin{figure} [H]

\begin{lstlisting}

\end{lstlisting}
\caption{Die Datei package.json}
\label{packagejson}
\end{figure}


, so that it is mentioned in listoffigures. The problem I have now is that the listing inside the figure has to be on one side an can't be splitted. I also cannot scale it to a certain size ( I tried using minipage ...) . Do I have to make two Listings if it does not fit on one page?

• Did you have a look at alternatives (e.g. not using list of figures, but an own list)? And what's about tcblisting (from tcolorbox) as a alternative allowing pagebreaks? BTW: It would be nice, if you could extend your code to be a MWE. – TeXnician Feb 21 '17 at 11:12
\lstlistoflistings