I am trying to put two figures next to each other in the top of a two-column document. I found the following code on the internet and it works:
\documentclass[10pt,prl,aps,showpacs,twocolumn,unsortedaddress]{revtex4-1}
\usepackage{subfigure}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{commath}
\usepackage{graphicx,bm}
\usepackage{verbatim}
\begin{document}
\begin{figure*}[t]
\setlength{\abovecaptionskip}{17.5 pt plus 4pt minus 2pt}
\mbox{
\subfigure{\includegraphics[scale=.95]{}}\,
\subfigure{\includegraphics[scale=.95]{}}
}
\vspace{-0.6 cm}
\caption{}
\label{}
\end{figure*}
\end{document}
However, I would also like to add captions a) and b) to the two subfigures. Simply inserting \caption into the subfigure environments does not work. Does anyone know how to solve this problem?
Best Answer
subfigure
is an obsolete package which shouldn't be used anynore. In its stead you can usesubfig
orsubcaption
. Below, I used the former, sincesubcaption
will produce a warning aboutrevtex4-1
being unsupported bycaption
(this might not be an issue, but I am not sure):Notice the line
so the caption number will have only one parenthesis (instead of the default formatting enclosing the number inside parentheses).
With
subcaption
, the code would be:But, as I mentioned before, you'll receive a warning: