6

I am using the Springer Nature's sn-basic document class. I have lots of figure and tables. Whenever I am using \begin{table}[H] I am getting LaTeX Error: \begin{tableorg} on input line 603 ended by \end{table}. and LaTeX Error: \begin{table} on input line 603 ended by \end{document}.#

Here is the preamble.

\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 Answer 1

5

In the documentclass sn-jnl.cls file:

Replace the lines 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}}

with

\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

EDIT Without touching cls file:

Add this in your preamble (before loading float package)

\renewenvironment{table}[1][]%
{\tableorg[#1]%
\tablebodyfont%
\renewcommand\footnotetext[2][]{{\removelastskip\vskip3pt%
\let\tablebodyfont\tablefootnotefont%
\hskip0pt\if!##1!\else{\smash{$^{##1}$}}\fi##2\par}}%
}{\endtableorg}
7
  • 1
    Thanks it works. When I submit the paper, isn't this a concern that I am changing the class file? Commented Aug 23, 2022 at 11:45
  • 1
    Possibly it will be... but if you tell them that they have a bug in their code and this is the fix they will possibly accept it... Also, I will upload another fix later (I think that I can do it) that will not require this change in their documentclass ... but if they fix it it will be much better
    – koleygr
    Commented Aug 23, 2022 at 11:47
  • 1
    Answer updated. Happy TeXing!
    – koleygr
    Commented Aug 23, 2022 at 12:01
  • 1
    Ask them to hire me to improve it hahahhaa
    – koleygr
    Commented Aug 23, 2022 at 12:03
  • 2
    @PrakharSharma by loading the float package you are already changing the intention of the class, as float redefines internals. So better ask them first if they like non-floating tables. Commented Aug 23, 2022 at 12:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .