![并排的小页面图片标题太过靠近](https://linux22.com/image/376536/%E5%B9%B6%E6%8E%92%E7%9A%84%E5%B0%8F%E9%A1%B5%E9%9D%A2%E5%9B%BE%E7%89%87%E6%A0%87%E9%A2%98%E5%A4%AA%E8%BF%87%E9%9D%A0%E8%BF%91.png)
我正在尝试使用 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}
如果你喜欢较小的图像,减少minipage
s 的宽度,例如将它们定位为\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 的值