0

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
   \begin{adjustbox}{minipage=\linewidth,scale=0.9}
\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{adjustbox}
\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...

2
  • Please extend your code fragment to complete small document (MWE) .
    – Zarko
    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

1 Answer 1

4

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:

enter image description here

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

enter image description here

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.