5

I'm in the \begin{figure*} environment, with a few subfigure objects that have no captions. After \end{subfigure}, I'm currently using

\caption[]{\small\justify blah blah blah}

which produces the following image enter image description here

However, if I go to

\caption[]{\small blah blah blah}

after first setting

\usepackage[justification=justified,singlelinecheck=false]{caption}
\usepackage[justification=justified,labelfont=large]{subcaption}

I get

enter image description here

which is what I want except the last line is centered. I want the last line to be as the first picture. Am I missing a really simple command? Thanks.

Total code:

 \begin{figure*}
  \begin{subfigure}[b]{0.485\textwidth}
           \centering
            \includegraphics[width=\textwidth]{fig1.eps}  
            \label{fig:1}
\vspace{-12pt}
        \end{subfigure}
        \begin{subfigure}[b]{0.485\textwidth}  
            \centering 
            \includegraphics[width=\textwidth]{fig2.eps}
            \label{fig:2}
\vspace{-12pt}
        \end{subfigure}
 %       \vskip\baselineskip
        \begin{subfigure}[b]{0.485\textwidth}   
            \centering 
            \includegraphics[width=\textwidth]{fig3.eps}
            \label{fig:3}
        \end{subfigure}
        \begin{subfigure}[b]{0.485\textwidth}   
            \centering 
            \includegraphics[width=\textwidth]{fig4.eps}
            \label{fig:4}
        \end{subfigure}
\vspace{-10pt}
        \caption[]{\small\justify blah blah blahblah blah}
\label{fig:plot}
\end{figure*} 
Gonzalo Medina
  • 505,128
John M
  • 153
  • 1
    Is this for a journal submission? If so, you don't need to adjust this type of setting. – Werner Feb 16 '15 at 01:33
  • Yes. Using Rev Tex 4-1. I'm under the impression I do though however.. Looking at that APS JAP papers, captions tend to be indented slightly but are justified throughout and hold the last line not be centered but left justified if its not a full line. – John M Feb 16 '15 at 01:34
  • Regardless of your choice, I'm sure the journal editors will update content to match their requirements. – Werner Feb 16 '15 at 01:41
  • Doesn't my answer solve your problem? – karlkoeller Feb 16 '15 at 17:08

1 Answers1

6

You shouldn't be using caption and subcaption with revtex4-1 because they have incompatibilities.

If you want to go on with it, load the package subcaption (which loads caption) without options and then load the package ragged2e and define

\DeclareCaptionJustification{justified}{\justifying}

At this point declare this setup

\captionsetup{justification=justified,singlelinecheck=false,labelfont=large}

MWE:

\documentclass{revtex4-1}
\usepackage[demo]{graphicx}
\usepackage{subcaption}
\usepackage{ragged2e}
\DeclareCaptionJustification{justified}{\justifying}
\captionsetup{justification=justified,singlelinecheck=false,labelfont=large}

\begin{document}
\begin{figure*}
        \begin{subfigure}[b]{0.485\textwidth}
           \centering
            \includegraphics[width=\textwidth]{fig1.eps}
            \label{fig:1}
\vspace{-12pt}
        \end{subfigure}
        \begin{subfigure}[b]{0.485\textwidth}
            \centering
            \includegraphics[width=\textwidth]{fig2.eps}
            \label{fig:2}
\vspace{-12pt}
        \end{subfigure}
 %       \vskip\baselineskip
        \begin{subfigure}[b]{0.485\textwidth}
            \centering
            \includegraphics[width=\textwidth]{fig3.eps}
            \label{fig:3}
        \end{subfigure}
        \begin{subfigure}[b]{0.485\textwidth}
            \centering
            \includegraphics[width=\textwidth]{fig4.eps}
            \label{fig:4}
        \end{subfigure}
\vspace{-10pt}
        \caption[]{\small blah blah blah blah blah blah blah blah blah blah blah blah 
                          blah blah blah blah blah blah blah blah blah blah blah blah 
                          blah blah blah blah blah blah blah blah blah blah blah blah 
                          blah blah blah blah blah blah blah blah blah blah blah blah 
                          blah blah blah blah blah blah blah blah blah blah blah blah 
                          blah blah blah blah blah blah blah blah blah blah blah blah 
                          blah blah blah blah blah blah blah blah}
\label{fig:plot}
\end{figure*} 
\end{document} 

Output:

enter image description here

karlkoeller
  • 124,410