19

I'm using Revtex 4.1 and would like to insert two images to appear as subfigures. I would like them to have labels a) and b). I've no idea how to do this in Revtex and the minipage idea below (from an answer to a similar question on Stackexchange) didn't work.

\begin{figure}
\subfloat[Fig6a.pdf]{
\begin{minipage}[c][1\width]{0.5\textwidth}%
\includegraphics[clip,width=1\textwidth]{Fig6a.pdf}%
\end{minipage}}
\subfloat[Fig6b.pdf]{\centering{}%
\begin{minipage}[c][1\width]{0.5\textwidth}%
\begin{center}
\includegraphics[clip,width=0.6\textwidth]{Fig6b.pdf}
\par\end{center}%
\end{minipage}}
\caption{main caption}
\end{figure}
3
  • Put a blank line between the subfloats.
    – Johannes_B
    Feb 21, 2015 at 20:07
  • btw, your code is quite strange. Ever thought of using package subcaption? Also works with hyperref ;-)
    – Johannes_B
    Feb 21, 2015 at 20:08
  • @Johannes_B as far as I know, subcaption is not compatible with revtex classes. Feb 21, 2015 at 21:00

1 Answer 1

32

You need no fancy minipage; the code you're using is for ensuring the two subcaptions are at the same vertical level, with the subfloats side by side.

\documentclass[twocolumn]{revtex4-1}

\usepackage{graphicx}
\usepackage[caption=false]{subfig}

\usepackage{lipsum} % just for the example

\begin{document}

\lipsum[1-2]

\begin{figure}[htp]

\subfloat[Fig6a.pdf]{%
  \includegraphics[clip,width=\columnwidth]{example-image-a}%
}

\subfloat[Fig6b.pdf]{%
  \includegraphics[clip,width=0.6\columnwidth]{example-image-b}%
}

\caption{main caption}

\end{figure}

\lipsum

\end{document}

enter image description here

3
  • Worked well, although your code needs an additional blank line (as Johannes pointed out) between the subfloats. Thanks! Feb 22, 2015 at 9:01
  • Thanks egreg. How can I align these figure in a row with margin. Your solution likes puts two figures in one column.
    – John
    May 25, 2017 at 9:44
  • 1
    @user8264 Don't leave a blank line between the two subfloats; use \hspace for deciding the space between them.
    – egreg
    May 25, 2017 at 10:51

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.