3

At the moment I'm working with the figure environment to display two graphs side by side using minipage which works fine. I want to use one caption for both and enumerate the minipages with a small a), b) or i) ii) on the left of the graphs so I can easily refer to them in the text and captions. Is there a way to do this or do I need to include the enumeration already in the graphs?

  • 1
    Take a look at the subcaption package, for example. You can put each minipage as a sub-figure and then have a main caption for the overall figure. – cfr Aug 30 '15 at 19:24
3

Here's one option using the \sidesubfloat command from the floatrow package; using subcapbesideposition (possible values= top, bottom, center) you can control the vertical position of the labels for the subfloats:

enter image description here

The code:

\documentclass[a4paper,10pt]{article}
\usepackage{graphicx}
\usepackage{floatrow}
\usepackage{subfig}

\begin{document}

As we can see in Figure~\ref{fig:test} and in Subfigures~\ref{fig:sub1} and~\ref{fig:sub2}\ldots

\thisfloatsetup{style=plain,subcapbesideposition=top}
\begin{figure}
\begin{minipage}{0.5\linewidth}
  \centering
  \sidesubfloat[]{\includegraphics[width=.8\linewidth]{example-image-a}\label{fig:sub1}}
\end{minipage}%
\begin{minipage}{0.5\linewidth}
  \centering
  \sidesubfloat[]{\includegraphics[width=.8\linewidth]{example-image-b}\label{fig:sub2}}%
\end{minipage}
\caption{A figure with two subfigures}
\label{fig:test}
\end{figure}

\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.