0

Here is what I am trying to do:

(a) Picture, Picture

(Caption for BOTH images (a) goes here)

(b) Picture, Picture

(Caption for BOTH images (b) goes here)

Etc. For the life of me I cannot figure out how to get ONE caption per pair of subfigure without LaTeX stacking the subfigures on top of each other. Each section of code typically looks like this:

\begin{subfigure}[h]{5cm}
    \includegraphics[scale=0.3]{graphicA1}
    \includegraphics[scale=0.3]{graphicA2}
    \caption{captionA}
\end{subfigure}\\

With a simple \begin{figure} and \end{figure} around the whole thing. When I try this, graphicA1 and graphicA2 get stacked on top of each other. I do NOT want this. I want A1 and A2 in one single row, with a combined caption designed specifically for that subfigure set. How?

3

Here is an example using subfigure. You can set width dependent on \textwidth to prevent linebreak caused by to big images.

\documentclass[a4paper]{article}
\usepackage{graphicx}
\usepackage{subfigure}

\begin{document}
    \begin{figure}
        \centering
        \subfigure[caption A B]{
            \includegraphics[width=0.49\textwidth]{example-image-a}
            \includegraphics[width=0.49\textwidth]{example-image-b}
        }
        \subfigure[caption C A]{
            \includegraphics[width=0.49\textwidth]{example-image-c}
            \includegraphics[width=0.49\textwidth]{example-image-a}
        }
        \caption{caption}
    \end{figure}
\end{document}

enter image description here

0

You could try to use this sample

\begin{figure}[ht]
        \begin{center}
        \begin{minipage}[b]{0.4\linewidth}
            \centering
            \includegraphics[scale = 0.5]{image A}
        \end{minipage}
        \quad
        \begin{minipage}[b]{0.4\linewidth}
            \centering
            \includegraphics[scale = 0.5]{image B}
        \end{minipage}\\

        \caption{...}
        \end{center}
\end{figure}
  • Don't use a center-environment inside of a figure-environment! It adds too much space. Instead you should use \centering as you did in your minipages. – Skillmon Jun 15 '17 at 16:44
  • Thank you for your advice. It really adds too much space compare with the case I don't use it. – Hoang-An Jun 16 '17 at 1:33

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.