答案1
这里有两种方法。第一种方法,我在图形环境中放置了 4 个小页面。第二种方法,我将图像及其标题放在图形环境中,tabularx
并使用包中的命令在cellspace
图像周围添加均匀的空白。
\documentclass{article}
\usepackage{graphicx}
%%%% Only used for the second example %%%%
\usepackage{tabularx}
\usepackage{cellspace}
\addparagraphcolumntypes{X}
\newcolumntype{Y}{>{\centering\arraybackslash}X}
\addparagraphcolumntypes{Y}
\setlength\cellspacetoplimit{\tabcolsep}
\setlength\cellspacebottomlimit{\cellspacetoplimit}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\begin{figure}
\begin{minipage}{0.475\textwidth}
\includegraphics[width=\linewidth]{example-image}
\end{minipage}\hfill
\begin{minipage}{0.475\textwidth}
\includegraphics[width=\linewidth]{example-image}
\end{minipage}
\bigskip
\begin{minipage}{0.475\textwidth}
\includegraphics[width=\linewidth]{example-image}
\end{minipage}\hfill
\begin{minipage}{0.475\textwidth}
\caption{my caption text goes here my caption text goes here}
\label{label}
\end{minipage}
\end{figure}
\begin{figure}
\renewcommand\tabularxcolumn[1]{m{#1}}
\begin{tabularx}{\textwidth}{@{}S{Y}S{Y}@{}}
\includegraphics[width=\linewidth]{example-image}
& \includegraphics[width=\linewidth]{example-image} \\
\includegraphics[width=\linewidth]{example-image}
& \caption{my caption text goes here my caption text goes here}\label{label} \\
\end{tabularx}
\end{figure}
\end{document}
答案2
这是一个使用\RawCaption
以下命令的简单解决方案floatrow
:
\documentclass[11pt]{article}
\usepackage{mwe}
\usepackage[export]{adjustbox}
\usepackage{caption}
\captionsetup{labelfont=bf}
\usepackage{floatrow}
\usepackage{eqparbox}
\begin{document}
\begin{figure}\raggedright
\includegraphics[scale=0.5,valign = c]{example-image-a} \qquad
\includegraphics[scale=0.5,valign = c]{example-image-b}\vspace{4ex}\par
\includegraphics[scale=0.5,valign = c]{example-image-c}\qquad
\parbox{6cm}%
{\hfill\RawCaption{\caption{Three images and the caption aligned like a table}\label{3images}}}
\end{figure}
\end{document}