子图不适用于 Springer 期刊

子图不适用于 Springer 期刊

我想问如何在 Springer Journals 中编译 subfigure 命令。这是我的代码:

 \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*}

Springer Latex 模板链接:https://www.springer.com/gp/livingreviews/latex-templates

一旦删除了子图线宽 ( \begin{subfigure}[t]%{0.65\textwidth}),就可以编译文件。但是,给出的图号与子图号不同。有没有办法命令一些代码运行带有子图的文件?

答案1

编译文档时您应该会收到以下错误:

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.

这是因为该caption包不适用于svjour3文档类。它检测到未知的标题代码,因此将自身切换到“兼容模式”,尝试尽可能与caption1995 年的包 v1.x 兼容。

subcaption软件包依赖于captionv3.x 提供的新功能,因此拒绝在该环境中工作。

可能的解决方案:尝试使用subfig不依赖于的包caption

\usepackage[caption=false]{subfig}

来自模板的示例文档:

\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{[email protected]}           %  \\
%             \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}

相关内容