# Reducing space between caption and figures with \makebox

I am trying too decrease the space between the captions in the makebox and the figures I am displaying with the following code;

\begin{figure}%
\centering
\hfil\hfil\includegraphics[width=8cm]{mainmatter/1/Chapter_4/heat_maps/hs4_original_heatmap.pdf}\hfil\hfil
\includegraphics[width=8cm]{mainmatter/1/Chapter_4/heat_maps/hs4_heat_predicted.pdf}\newline
\setlength\parindent{0pt}
\null\hfil\hfil\makebox[5cm]{Original incidence matrix \protect\linebreak ${\bf M}$.}
\null\hfil\hfil\makebox[5cm]{Surrogate incidence matrix \protect\linebreak $\hat{\bf M}^{(MC)}$.}
\caption{Original versus surrogate incidence matrix for the year 2018 at the HS-4 level.}
\end{figure}


However the sapce between single captions of the figures and the figures is still large. How can I decrease it? I tried with \setlength\parindent{0pt} but it does not work...

• Please extend your code fragment to complete small document (MWE) . Jul 28, 2021 at 9:38
• You might want to look at the subcaption package. Also section 2.6 of the caption package manual. Jul 29, 2021 at 1:03

Breaking lines in boxes created with \makebox is not possible.

The code is really clumsy, I'm afraid, and uses undocumented commands such as \null. I see no reason for adjustbox either.

Based on the template we discussed in a previous post of yours, here's the output from your code:

With the following much simpler code

\begin{figure}[!htp]
\centering
\renewcommand{\arraystretch}{0.5}% to countermand double spacing

\begin{tabular}{ @{} c c @{} }
\includegraphics[width=7.2cm]{example-image} &
\includegraphics[width=7.2cm]{example-image} \\
Original incidence matrix $\mathbf{M}$ &
Surrogate incidence matrix $\hat{\mathbf{M}}^{(\mathrm{MC})}$
\end{tabular}

\caption{Original versus surrogate incidence matrix for the year 2018 at the HS-4 level.}
\end{figure}


you get

Please, remember that \bf has been a deprecated command since before you were born (judging from you writing a PhD thesis).