10

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}
  • Put a blank line between the subfloats. – Johannes_B Feb 21 '15 at 20:07
  • btw, your code is quite strange. Ever thought of using package subcaption? Also works with hyperref ;-) – Johannes_B Feb 21 '15 at 20:08
  • @Johannes_B as far as I know, subcaption is not compatible with revtex classes. – Gonzalo Medina Feb 21 '15 at 21:00
22

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

| improve this answer | |
  • Worked well, although your code needs an additional blank line (as Johannes pointed out) between the subfloats. Thanks! – user1936752 Feb 22 '15 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 '17 at 9:44
  • @user8264 Don't leave a blank line between the two subfloats; use \hspace for deciding the space between them. – egreg May 25 '17 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.