Using this post I tried to add multiple pairs of subfigures to my latex document
\usepackage{minted}
\usemintedstyle{borland}
\newcommand{\code}[1]{\mintinline{c}{#1}}
\usepackage{subcaption}
\usepackage{graphicx}
\begin{document}
\subsection{\code{process_select()}}
The following diagrams show how \code{process_select()} would modify the \code{queue} and \code{current_process} for test \code{lab3_t0.c}.
\begin{figure}[h]
\centering
\begin{subfigure}[b]{0.5\textwidth}
\includegraphics[width=1\linewidth]{process_select1}
\caption{\code{queue}}
\end{subfigure}
\begin{subfigure}[b]{0.25\textwidth}
\includegraphics[width=1\linewidth]{process_select2}
\caption{\code{current_process}}
\end{subfigure}
\caption{Initially \code{queue} would hold both processes, but \code{current_process} would not be set since \code{process_select()} has not been called so no \code{current_process} has been set}
\begin{subfigure}[b]{0.5\textwidth}
\includegraphics[width=1\linewidth]{process_select3}
\caption{\code{queue}}
\end{subfigure}
\begin{subfigure}[b]{0.25\textwidth}
\includegraphics[width=1\linewidth]{process_select4}
\caption{\code{current_process}}
\end{subfigure}
\end{figure}
\end{document}
But nothing shows up!
But when I change the width of the last 2 subfigures to width=0.5\linewidth:
\begin{subfigure}[b]{0.5\textwidth}
\includegraphics[width=0.5\linewidth]{process_select3}
\caption{\code{queue}}
\end{subfigure}
\begin{subfigure}[b]{0.25\textwidth}
\includegraphics[width=0.5\linewidth]{process_select4}
\caption{\code{current_process}}
\end{subfigure}
It shows up but not the way I want it to:

What I want is for the process_select3 and process_select4 to show up in the same size as process_select1 and process_select2. I also have an additional 2 subfigures process_select5 and proceess_select6 that I want to add, which I tried using:
\begin{subfigure}[b]{0.5\textwidth}
\includegraphics[width=0.5\linewidth]{process_select5}
\caption{\code{queue}}
\end{subfigure}
\begin{subfigure}[b]{0.25\textwidth}
\includegraphics[width=0.5\linewidth]{process_select6}
\caption{\code{current_process}}
\end{subfigure}
\caption{After second call to \code{process_select()} \code{current_process} would be set to the next process in the \code{queue} (\code{p2}) and since the \code{p1} is still running, it would be appended to the end of the queue}
But sadly nothing showed up when I added that code in the \begin{figure}...\end{figure} environment
If anyone could provide me the latex code to make all 6 of my subfigures (process_select1-6) show up with the same width as the first 2 subfigures (process_select3 and process_select4) and also have a caption for each pair of subfigures, that would be great!

\documentclass{...}˙– Zarko Mar 24 '17 at 21:13process_select 1&process_select2, a caption forprocess_select3&process_select4, and a caption forprocess_select5&process_select6). But perhaps I am doing this wrong? – 14wml Mar 24 '17 at 21:24\documentclass{...}on its beginning andend{document}on its end :), which show the your problem. – Zarko Mar 24 '17 at 22:29