Graphics, Figures & TablesSubfigure with RevTeX

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
gammapoint
Posts: 11
Joined: Fri Jul 24, 2009 11:07 pm

Subfigure with RevTeX

Post by gammapoint »

Hi, I am trying to create a 2x2 array of figures as a single figure in LaTeX. I'd like to have a single caption at the bottom but would like each of the figures in the 2x2 array to have the labels (a), (b), (c), and (d).

This should be easy by following the steps like in the example shown here: http://en.wikibooks.org/wiki/LaTeX/Floa ... #Subfloats

However, it gets tricky because I'm using the ReVTeX package, which apparently already has a \caption command in it. So instead I chose to not load the label \caption and instead do

Code: Select all

\usepackage{graphicx}
%\usepackage{caption}                                                           
\usepackage[caption=false]{subcaption}
This mostly works, except now I don't know how to add the labels (a), (b), (c), and (d). If I add a caption in the subfigure environment with no text I would imagine this is what should happen. Instead however, a new FIG number is created at this place and my Figure numbers throughout the paper get incremented by one. I am guessing that this has to do with the fact that now subfigure is not getting to use its caption stuff, and so something is getting messed up in the process.

Any suggestions on how to fix this? I appreciate any help you can give.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Subfigure with RevTeX

Post by localghost »

gammapoint wrote:[…] However, it gets tricky because I'm using the ReVTeX package, which apparently already has a \caption command in it. So instead I chose to not load the label \caption […]
You are mistaken in regard to captions. The caption package does not define the \caption command, it lets you customize the appearance of captions. Those captions are defined by the document class.

In order to give an adequate problem description you should prepare a proper minimal example that contains all necessary but only relevant information in form of code.


Best regards and welcome to the board
Thorsten
User avatar
sommerfee
Posts: 503
Joined: Mon Apr 09, 2007 4:20 pm

Subfigure with RevTeX

Post by sommerfee »

Since the caption package is incompatible with RevTeX, you cannot use the subcaption package since it is. dependent on the caption package. Furthermore the subcaption package does not offer an option called "caption=false".

So use the subfig package instead, and load it with option "caption=false":

Code: Select all

\usepackage[caption=false]{subfig}
Post Reply