0

I have a table with an odd number of pictures that I dispose two per row. The bottom-right corner is then figure-less, and I would like that the caption of the figure appears there to save some vertical space. It should really be the caption, so that I can reference the figure in the text if needed.

Is there a solution?

Example:

\begin{figure}
\centering
\begin{tabular}{cc}
    \includegraphics[scale=0.5]{Figures/test}
     & 
    \includegraphics[scale=0.5]{Figures/test}
    \\
    \includegraphics[scale=0.5]{Figures/test}
    & 
    PUT FIGURE WITH CAPTION HERE (to be referred)
\end{tabular}
\end{figure}

enter image description here

1

1 Answer 1

1

You can use column type p, m or b. m and b need package array, which is also useful for centering the images inside the columns:

\documentclass{article}
\usepackage{graphicx}
\usepackage{array}
\usepackage{calc}
\begin{document}
\begin{figure}
\centering
\begin{tabular}{*2{>{\centering\arraybackslash}b{.5\textwidth-2\tabcolsep}}}
    \includegraphics[scale=0.5]{example-image-a}
     & 
    \includegraphics[scale=0.5]{example-image-b}
    \\
    \includegraphics[scale=0.5]{example-image-c}
    & 
    \caption{PUT FIGURE WITH CAPTION HERE (to be referred)}
\end{tabular}
\end{figure}
\end{document}

bottom aligned caption

The three column types only differ in the vertical alignment. Sometimes using package adjustbox could also be useful:

\documentclass{article}
\usepackage{graphicx}
\usepackage{array}
\usepackage{calc}
\usepackage{adjustbox}
\begin{document}
\begin{figure}
\centering
\begin{tabular}{*2{>{\centering\arraybackslash}p{.5\textwidth-2\tabcolsep}}}
    \includegraphics[scale=0.5]{example-image-a}
     & 
    \includegraphics[scale=0.5]{example-image-b}
    \\
    \adjincludegraphics[scale=0.5,valign=T]{example-image-c}
    & 
    \caption{PUT FIGURE WITH CAPTION HERE (to be referred)}
\end{tabular}
\end{figure}
\end{document}

top aligned caption

4
  • Does this conflict with booktabs?
    – G. Gare
    Jun 23, 2023 at 15:04
  • @G.Gare Don't think so. But if you have a problem in combination with booktabs please ask a new question with a corresponding minimal working example instead of a code snippet only.
    – cabohah
    Jun 23, 2023 at 15:06
  • Fair enough. It actually doesn't. I made it work using your solution.
    – G. Gare
    Jun 23, 2023 at 15:08
  • The label to the figure should be added within tabular (just below the caption) and not in the figure outside the tabular - for completeness
    – G. Gare
    Jun 23, 2023 at 15:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .