3

I'm trying to put two (semi-unrelated) figures side by side using minipages. I don't particularly want to use a solution that would split the figures into Fig. 1(a) and Fig. 1(b), since they don't really belong together like that.

I'm using minipages, however the two figure captions have nearly no visible separation which obviously looks wrong. 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}

I've tried putting an \makebox around both minipages together, but that didn't work, and I've looked for other solutions but most of them seem to relate to subfigures rather than two independent figures.

1
  • 2×0.55\textwidth is more than \textwidth! That said, you can try the floatrow  package.
    – Bernard
    May 22, 2018 at 12:02

2 Answers 2

4

you declare width of both minipage that their summ is wider than is text width. solution i makes they narrower in introduce \hfill between them:

\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}

enter image description here

if you like to have smaller image, reduce width of minipages, for example position them by \centering and use \hfil between them:

\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}

enter image description here

0

Below tags works fine, but not sure about its accuracy:

\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}

I've given the value instead of 0.55\textwidth

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .