How can one create a two-column figure with a side caption using revtex?
I've seen this in published articles but did not find any information how to achieve it.
How can one create a two-column figure with a side caption using revtex?
I've seen this in published articles but did not find any information how to achieve it.
I assume you are using revtex4-1. This is the code that I am using for when I want a figure on both columns. You might need to modify the scale parameter for your images.
\documentclass[12pt,reprint]{revtex4-1}
\usepackage{graphicx}
\usepackage{caption, subcaption}
\begin{document}
\onecolumngrid
\begin{figure}[h]
\centering
\begin{subfigure}[h]{0.45\textwidth}
\centering
\includegraphics[scale=0.45]{filename1.png}
\caption{subcaption1}
\label{fig:1}
\end{subfigure}%
~
\begin{subfigure}[h]{0.45\textwidth}
\centering
\includegraphics[scale=0.45]{filename2.png}
\caption{subcaption2}
\label{fig:2}
\end{subfigure}
\caption{Some caption}
\label{fig:caption}
\end{figure}
\twocolumngrid
\end{document}
You might be tempted to use \usepackage[caption=false]{subfig} instead of caption and subcaption but then you will not be able to have, as far as I know, the main capture for your figure. I am sure there is a way around it I just couldn't find it.
The code when \usepackage[caption=false]{subfig} is used would look something like this:
\onecolumngrid
\begin{figure}
\centering
\subfloat[subcaption1]{\includegraphics[width=0.5\textwidth]{fig1.png}}
~
\subfloat[subcaption2]{\includegraphics[width=0.5\textwidth]{fig2.png}}
\end{figure}
\twocolumngrid
The caption can be moved to the side by using sidecap. Therefore, the code is modified by changing the figure to SCfigure and removing the [h] from the SCfigure. To achieve optimal side captions, the user has to adjust manually the figure boarders or use minipage to separate the figure and the caption.
\documentclass[12pt,reprint]{revtex4-1}
\usepackage{graphicx}
\usepackage{sidecap}
\usepackage{caption, subcaption}
\begin{document}
\onecolumngrid
\begin{SCfigure}
\centering
\begin{subfigure}[h]{0.45\textwidth}
\includegraphics[scale=0.45]{filename1.png}
\caption{subcaption1}
\label{fig:1}
\end{subfigure}%
~
\begin{subfigure}[h]{0.45\textwidth}
\includegraphics[scale=0.45]{filename2.png}
\caption{subcaption2}
\label{fig:2}
\end{subfigure}
\caption{some caption that is used as a means to test the side caption of this figure}\label{fig:caption}
\end{SCfigure}
\twocolumngrid
\end{document}
\documentclassand ending with\end{document}) that shows your setup and that we can use as a starting point. – gernot Apr 07 '17 at 11:20