![Springer Nature:表格放置存在 [H] 参数错误](https://linux22.com/image/453831/Springer%20Nature%EF%BC%9A%E8%A1%A8%E6%A0%BC%E6%94%BE%E7%BD%AE%E5%AD%98%E5%9C%A8%20%5BH%5D%20%E5%8F%82%E6%95%B0%E9%94%99%E8%AF%AF.png)
我正在使用 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}