并排的小页面图片标题太过靠近

并排的小页面图片标题太过靠近

我正在尝试使用 minipages 将两个(半无关)图并排放置。我并不特别想使用将图拆分为图 1(a) 和图 1(b) 的解决方案,因为它们实际上不属于一起。

我正在使用 minipages,但是两个图形标题几乎没有明显的分隔,这显然是错误的。MWE:

\documentclass[a4paper, 11pt]{memoir} %including in case it's relevant
\usepackage[margin=3cm]{geometry} % again, not sure if relevant
\usepackage[demo]{graphicx}

\begin{document}

\begin{figure}
  \begin{minipage}{0.55\textwidth} %trying to force figs apart
    \includegraphics{figs/fig1}
    \caption{Abcdegy-oiutpwhc WQER measurements at x and y etc.} 
    % difficult text to linebreak nicely?
  \end{minipage}
  ~
    \begin{minipage}{0.55\textwidth}
    \includegraphics{figs/fig2}
    \caption{Abcdegy-oiutpwhc WQER measurements at x and y etc.}
  \end{minipage}
\end{figure}

\end{document}

我曾尝试将\makebox两个小页面放在一起,但没有效果,我也曾寻找其他解决方案,但大多数似乎都与子图有关,而不是两个独立的图。

答案1

您声明两者的宽度minipage,使它们的总宽度大于文本宽度。解决方案我在\hfill它们之间引入时使它们变窄:

\documentclass[a4paper, 11pt]{memoir} %including in case it's relevant
\usepackage[margin=3cm]{geometry} % again, not sure if relevant
\usepackage[demo]{graphicx}

\begin{document}
\begin{figure}
  \begin{minipage}[t]{0.45\textwidth} %trying to force figs apart
    \includegraphics[width=\linewidth]{figs/fig1}
    \caption{Abcdegy-oiutpwhc WQER measurements at x and y etc.}
  \end{minipage}%
  \hfill
  \begin{minipage}[t]{0.45\textwidth}
    \includegraphics[width=\linewidth]{figs/fig2}
    \caption{Abcdegy-oiutpwhc WQER measurements at x and y etc.}
  \end{minipage}
\end{figure}
\end{document}

在此处输入图片描述

如果你喜欢较小的图像,减少minipages 的宽度,例如将它们定位为\centering\hfil在它们之间使用:

\documentclass[a4paper, 11pt]{memoir} %including in case it's relevant
\usepackage[margin=3cm]{geometry} % again, not sure if relevant
\usepackage[demo]{graphicx}

\begin{document}

\begin{figure}
\centering
  \begin{minipage}[t]{0.3\textwidth} %trying to force figs apart
    \includegraphics[width=\linewidth]{figs/fig1}
    \caption{Abcdegy-oiutpwhc WQER measurements at x and y etc.}
  \end{minipage}%
  \hfil
  \begin{minipage}[t]{0.3\textwidth}
    \includegraphics[width=\linewidth]{figs/fig2}
    \caption{Abcdegy-oiutpwhc WQER measurements at x and y etc.}
  \end{minipage}
\end{figure}
\end{document}

在此处输入图片描述

答案2

以下标签工作正常,但不确定其准确性:

\documentclass[a4paper, 11pt]{memoir} %including in case it's relevant
\usepackage[margin=3cm]{geometry} % again, not sure if relevant
\usepackage[demo]{graphicx}

\begin{document}

\begin{figure}
  \begin{minipage}{10pc} %trying to force figs apart
{\rule{10pc}{10pc}}
    \caption{Abcdegy-oiutpwhc WQER measurements at x and y etc.} 
    % difficult text to linebreak nicely?
  \end{minipage}
  ~
    \begin{minipage}{10pc}
{\rule{10pc}{10pc}}
    \caption{Abcdegy-oiutpwhc WQER measurements at x and y etc.}
  \end{minipage}
\end{figure}
\end{document}

我给出了 0.55\textwidth 的值

相关内容