1

While writing a document using revtex4-1 I need to put two figures side by side in a single column. I have tried \subfigure command as follows,

\begin{figure*}[htp]
    \centering
    \subfigure[caption 1]{\includegraphics[scale=0.38]{image1.png}}\quad
    \subfigure[caption 2]{\includegraphics[scale=0.38]{image2.png}}
\end{figure*}

But it doesn't work. The following error message is shown,

Missing number, treated as zero. ...graphics[scale=0.38]{image1.png}}

Along with many other error messages. Can anyone point out what I am missing ?

3
  • 2
    Welcome to TwX.SE! For figure in the single column you should use figure and not figure*. If I remember correctly, revtex4-1 is obsolete. Instead it you should use revtex4-2. For further help please extend your code fragment to complete small document, which reproduce your problem.
    – Zarko
    Sep 23 at 7:11
  • Did you load graphics instead of graphicx? Sep 23 at 15:37
  • No, i didn't load
    – bubucodex
    Sep 24 at 13:35

1 Answer 1

0
  • Welcome to TeX.SE!
  • The cause of your problem is not in showed code fragment, but probably in your document preamble (see see @John Kormylo comment).
  • The following MWE works fine and can serve as starting point to write your document:
\documentclass[reprint,
               amssymb,
               aps,
               ]{revtex4-2}
%--------------- show page layout. don't use in a real document!
\usepackage{showframe}
\renewcommand\ShowFrameLinethickness{0.15pt}
\renewcommand*\ShowFrameColor{\color{red}}
%
\usepackage{lipsum}                       % for dummy text filler
%---------------------------------------------------------------%
\usepackage{graphicx}              % <---
\usepackage[caption=false]{subfig} % <---

\begin{document}
\lipsum[1]
\begin{figure}[htp]
\setkeys{Gin}{width=0.48\linewidth}
    \subfloat[caption 1]{\includegraphics{example-image-a}}\hfill%
    \subfloat[caption 2]{\includegraphics{example-image-b}}
\caption{Common caption}
\end{figure}
\lipsum[2-7]
\end{document}

enter image description here

You must log in to answer this question.

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