[Tex/LaTex] Subfigure does not work for Springer journal

floatssubfloats

I would like to ask how to compile subfigure command in Springer Journals. Here is my code:

 \begin{figure*}[htp]   
   \begin{subfigure}[t]{0.65\textwidth}
    \centering            
\includegraphics[width=.65\textwidth]{../latex/figure/rev_n.pdf}
        \caption{An example of }\label{rev}
     \end{subfigure}
~
 \begin{subfigure}[t]{0.35\textwidth}
  \centering
\includegraphics[width=.35\textwidth]{../latex/figure/rev_sol_n.pdf}
        \caption{An scheme of }\label{rev_sol} 
   \end{subfigure}

        \caption{Illustration of }\label{bs1}
\end{figure*}

Link for springer latex template:https://www.springer.com/gp/livingreviews/latex-templates.

Once removed subfigure linewidth (\begin{subfigure}[t]%{0.65\textwidth}), it is possible to compile the file. However, gives different figure number not subfigure number. Is there any way to command some codes to run the file with subfigure?

Best Answer

When compiling your document you should get the following error:

Package caption Warning: \caption will not be redefined since it's already
(caption)                redefined by a document class or package which is
(caption)                unknown to the caption package.
See the caption package documentation for explanation.

! Package caption Error: The `subcaption' package does not work correctly
(caption)                in compatibility mode.

This is because the caption package isn't adapted to the svjour3 document class. It detects unknown caption code and therefore switches itself into the "compatibility mode", trying to be as compatible as possible to the caption package v1.x from 1995.

The subcaption package is relying on new features offered by caption v3.x, and therefore refuse to work in this environment.

Possible solution: Try the subfig package instead which isn't relying on caption:

\usepackage[caption=false]{subfig}

An example document, derived from the template:

\documentclass[twocolumn]{svjour3}          % twocolumn
%
\usepackage[demo]{graphicx}
\usepackage[caption=false]{subfig}

\begin{document}

\title{Insert your title here}
\subtitle{Do you have a subtitle?\\ If so, write it here}

%\titlerunning{Short form of title}        % if too long for running head

\author{First Author         \and
        Second Author %etc.
}

%\authorrunning{Short form of author list} % if too long for running head

\institute{F. Author \at
              first address \\
              Tel.: +123-45-678910\\
              Fax: +123-45-678910\\
              \email{fauthor@example.com}           %  \\
%             \emph{Present address:} of F. Author  %  if needed
           \and
           S. Author \at
              second address
}

\date{Received: date / Accepted: date}
% The correct dates will be entered by the editor

\maketitle

\begin{abstract}
Insert your abstract here. Include keywords, PACS and mathematical
subject classification numbers as needed.
\keywords{First keyword \and Second keyword \and More}
\end{abstract}

\section{Subfigures}

\begin{figure*}[htp]
   \subfloat[An example of ]{\label{rev}
      \includegraphics[width=.65\textwidth]{../latex/figure/rev_n.pdf}}
~
   \subfloat[An scheme of ]{\label{rev_sol}
      \includegraphics[width=.35\textwidth]{../latex/figure/rev_sol_n.pdf}}

   \caption{Illustration of }\label{bs1}
\end{figure*}

\end{document}