I am refering to this question: How to place two code snippets next to each other with minted?
I am trying to use the answer provided there, but with a headline over each code snippet. Sadly, this is causing a vertical shift of the right box, so that the right box is placed a bit below the left box.
The first figure in the code is with headlines (VBS and JS), the other is without headlines.
\documentclass[
ngerman, % German
english, % English (default)
toc=listof,
toc=bibliography,
]{scrreprt}
\usepackage{minted}
% \usepackage{mathpazo} --> This is causing the shift of the boxes!
\begin{document}
\begin{figure}[!h]
\begin{minipage}{0.5\textwidth}
\centering
VBS
\begin{minted}[fontsize=\footnotesize, frame=single]{vbscript}
EXAMPLE CODE
EXAMPLE CODE
EXAMPLE CODE
\end{minted}
%\captionof{figure}{VBS}
\end{minipage}
\begin{minipage}{0.5\textwidth}
\centering
JS
\begin{minted}[fontsize=\footnotesize, frame=single]{js}
EXAMPLE CODE
EXAMPLE CODE
EXAMPLE CODE
\end{minted}
%\captionof{figure}{JS}
\end{minipage}
\captionof{figure}{TEST 1.}
\label{figure:test1}
\end{figure}
\begin{figure}[!h]
\begin{minipage}{0.5\textwidth}
\centering
\begin{minted}[fontsize=\footnotesize, frame=single]{vbscript}
EXAMPLE CODE
EXAMPLE CODE
EXAMPLE CODE
\end{minted}
%\captionof{figure}{VBS}
\end{minipage}
\begin{minipage}{0.5\textwidth}
\centering
\begin{minted}[fontsize=\footnotesize, frame=single]{js}
EXAMPLE CODE
EXAMPLE CODE
EXAMPLE CODE
\end{minted}
%\captionof{figure}{JS}
\end{minipage}
\captionof{figure}{TEST 2.}
\label{figure:test2}
\end{figure}
\end{document}
\documentclass
and ending with\end{document}
. Different document classes could have different results, so we need more information to produce an accurate answer.