大图旁边有几张小图

大图旁边有几张小图

我正在尝试实现这样的效果

 _____    ___   ___
|     |  |___| |___|
|     |   ___
|_____|  |___|

但我无法让它正确地转到顶部。我尝试了两个小页面,将第二个表放入小页面,但无济于事

这是我的代码

\begin{figure}
    \centering
    \begin{tabular}{cc}
        \begin{subfigure}[t]{0.5\textwidth}
            \centering
            \includegraphics[width=\linewidth]{figures/LDAoT_synth/A/chains.png}
        \end{subfigure} &
        \begin{tabular}{cc}
            \begin{subfigure}[t]{0.25\textwidth}
                \centering
                \includegraphics[width=\linewidth]{figures/LDAoT_synth/A/errors.png}
            \end{subfigure} &
            \begin{subfigure}[t]{0.25\textwidth}
                \centering
                \includegraphics[width=\linewidth]{figures/LDAoT_synth/A/cosine_errors.png}
            \end{subfigure} \\
            \begin{subfigure}[t]{0.25\textwidth}
                \centering
                \includegraphics[width=\linewidth]{figures/LDAoT_synth/A/hellinger_errors.png}
            \end{subfigure} &
        \end{tabular}
    \end{tabular}
\end{figure}

这是我得到的

未对齐的图像

我该如何修复它?

附录:

我怎样才能得到它?

 _____    ___   ___
|     |  |___| |___|
|     |   ___   ___
|_____|  |___| |___|
 ____   ____   ____
|____| |____| |____|

答案1

subcaption如果图像没有副标题,则不需要。

这里有一种方法,通过测量大图。在示例中,我使用的\scalebox只是让大图高于两个小图。

\documentclass{article}

\usepackage{graphicx}

\newbox{\bigpicturebox}

\begin{document}

\begin{figure}
\centering

\sbox{\bigpicturebox}{%
  \scalebox{1}[1.2]{\includegraphics[width=.45\textwidth]{example-image}}%
}

\usebox{\bigpicturebox}\hfill
\begin{minipage}[b][\ht\bigpicturebox][s]{.45\textwidth}
\includegraphics[width=.45\textwidth]{example-image-a}\hfill
\includegraphics[width=.45\textwidth]{example-image-b}

\vfill

\includegraphics[width=.45\textwidth]{example-image-c}
\end{minipage}

\medskip
\includegraphics[width=.225\textwidth]{example-image-a}\hfill
\includegraphics[width=.225\textwidth]{example-image-b}\hfill
\includegraphics[width=.225\textwidth]{example-image-c}

\end{figure}

\end{document}

在此处输入图片描述

这是带有子标题的版本;添加\label您需要的命令。

\documentclass{article}

\usepackage{subcaption}
\usepackage{graphicx}

\newbox{\bigpicturebox}

\begin{document}

\begin{figure}
\centering

\sbox{\bigpicturebox}{%
  \begin{subfigure}[b]{.45\textwidth}
  \scalebox{1}[1.2]{\includegraphics[width=\textwidth]{example-image}}%
\caption{Big picture}
\end{subfigure}
}

\usebox{\bigpicturebox}\hfill
\begin{minipage}[b][\ht\bigpicturebox][s]{.45\textwidth}
\begin{subfigure}{.45\textwidth}
\includegraphics[width=\textwidth]{example-image-a}
\caption{Small figure}
\end{subfigure}\hfill
\begin{subfigure}{.45\textwidth}
\includegraphics[width=\textwidth]{example-image-b}
\caption{Small figure}
\end{subfigure}

\vfill

\begin{subfigure}[b]{.45\textwidth}
\includegraphics[width=\textwidth]{example-image-c}
\caption{Small figure}
\end{subfigure}
\end{minipage}

\bigskip

\begin{subfigure}{.3\textwidth}
\includegraphics[width=\textwidth]{example-image-a}
\caption{Small figure}
\end{subfigure}\hfill
\begin{subfigure}{.3\textwidth}
\includegraphics[width=\textwidth]{example-image-b}\hfill
\caption{Small figure}
\end{subfigure}\hfill
\begin{subfigure}{.3\textwidth}
\includegraphics[width=\textwidth]{example-image-c}
\caption{Small figure}
\end{subfigure}

\end{figure}

\end{document}

在此处输入图片描述

答案2

这是一种简单的方法tabular。我将框向下移动includegraphics,以便参考位于第一个表格中图形的顶部边缘。不过,这需要一点手动调整——当然可以做得更好。

\documentclass{article}
\usepackage{graphicx}
\begin{document}
\begin{tabular}{@{}cc@{}}
    \raisebox{-\height}{\includegraphics[width=0.45\textwidth]{example-image-a}} & 
    \begin{tabular}[t]{@{}cc@{}}
        \raisebox{-\height}{\includegraphics[width=0.2\textwidth]{example-image-b}} & 
        \raisebox{-\height}{\includegraphics[width=0.2\textwidth]{example-image-b}} \\[1.8cm]
        \raisebox{-\height}{\includegraphics[width=0.2\textwidth]{example-image-b}} & 
    \end{tabular}
\end{tabular}

\bigskip

\begin{tabular}{@{}ccc@{}}
    \includegraphics[width=0.3\linewidth]{example-image-a} &
    \includegraphics[width=0.3\linewidth]{example-image-a} &
    \includegraphics[width=0.3\linewidth]{example-image-a} 
\end{tabular}

\end{document}

对齐框的结果

相关内容