Springer Nature:表格放置存在 [H] 参数错误

Springer Nature:表格放置存在 [H] 参数错误

我正在使用 Springer Nature 的sn-basic文档类。我有很多图表。每当我使用时,\begin{table}[H]我都会LaTeX Error: \begin{tableorg} on input line 603 ended by \end{table}. 得到LaTeX Error: \begin{table} on input line 603 ended by \end{document}.#

以下是序言。

\documentclass[pdflatex,sn-basic]{sn-jnl}
\usepackage{array}
\usepackage{float}
\usepackage{xcolor}
\usepackage{subfig}
\jyear{2022}%

\theoremstyle{thmstyleone}%
\newtheorem{theorem}{Theorem}%  meant for continuous numbers
\newtheorem{proposition}[theorem]{Proposition}% 

\theoremstyle{thmstyletwo}%
\newtheorem{example}{Example}%
\newtheorem{remark}{Remark}%

\theoremstyle{thmstylethree}%
\newtheorem{definition}{Definition}%
\providecommand{\tabularnewline}{\\}
\raggedbottom

答案1

在 documentclasssn-jnl.cls文件中:

替换第 1339 至 1348 行:

\let\tableorg\table%
\let\endtableorg\endtable%

\renewenvironment{table}[1][]%
{\begin{tableorg}[#1]%
\tablebodyfont%
\renewcommand\footnotetext[2][]{{\removelastskip\vskip3pt%
\let\tablebodyfont\tablefootnotefont%
\hskip0pt\if!##1!\else{\smash{$^{##1}$}}\fi##2\par}}%
}{\end{tableorg}}

\let\tableorg\table%
\let\endtableorg\endtable%

\renewenvironment{table}[1][]%
{\tableorg[#1]%koleygr: Change here
\tablebodyfont%
\renewcommand\footnotetext[2][]{{\removelastskip\vskip3pt%
\let\tablebodyfont\tablefootnotefont%
\hskip0pt\if!##1!\else{\smash{$^{##1}$}}\fi##2\par}}%
}{\endtableorg}%koleygr: Change here

编辑无需修改 cls 文件

将其添加到你的序言中(在加载float包之前)

\renewenvironment{table}[1][]%
{\tableorg[#1]%
\tablebodyfont%
\renewcommand\footnotetext[2][]{{\removelastskip\vskip3pt%
\let\tablebodyfont\tablefootnotefont%
\hskip0pt\if!##1!\else{\smash{$^{##1}$}}\fi##2\par}}%
}{\endtableorg}

相关内容