[Tex/LaTex] Error when using the amsthm package

amsthmcaptionserrorsfootnotes

I've got following error message when compiling for a journal article:

/usr/share/texlive/texmf-dist/tex/latex/amscls/amsthm.sty:431: LaTeX Error: Command \proof already defined. Or name \end… illegal, see p.192 of the manual.

while compiling this in overleaf:

\documentclass[lnbip]{svmultln}
\usepackage{lineno,hyperref, graphicx, caption, color, amsthm, float, makeidx}
\usepackage[utf8]{inputenc}

\modulolinenumbers[5]

\setlength{\parindent}{0em}

\setlength{\parskip}{0.8em}

\setlength{\belowcaptionskip}{-12pt}

\newtheoremstyle{dotless}{}{}{\itshape}{}{\bfseries}{}{ }{}

\theoremstyle{dotless}

\newtheorem {lem}{Lemma}

\begin{document}

and Journal send me this error (I don't know what editor they use)

! Runaway argument?
\begin {linenomath}\LN@displaymath \@nil  \@ifpackageloaded {amstex}{\ETC.
! Paragraph ended before \@tempa was complete.
<to be read again> 
                   \par 
l.435 \newenvironment{proof}[1][\proofname]{\par

But everything is ok on Sharelatex.

p.s (updated): I dont get error more after delete amsthm, add amsmath and remove \newtheoremstyle{dotless}{}{}{\itshape}{}{\bfseries}{}{ }{} and \theoremstyle{dotless} and after reformat all formula but I get error for caption with footnote and 2^14 x 2^14 (it is ok in sharelatex):

\begin{figure}[h]
\centering
\includegraphics[width=\linewidth]{fig6.PNG}
\captionsetup{justification=centering}
\caption{...    A\footnotemark \\ with dimensions 2^{24} \times 2^{24}.}
\label{figure6}
\end{figure}


\footnotetext{\url{}}

Best Answer

The amsthm package is not compatible with Springer document classes. It's not difficult to make them load it, but this increases the risk that the document is eventually rejected because of not being compliant with the house style.

In general, when using classes or packages provided by publishers or conference organizers, one should stick to their style.

In your case, you seem to want that there's no period after statements' labels, so

Lemma 1 Some statement.

instead of what the class does, which is

Lemma 1. Some statement.

This is easily done and the copy editors will most probably reject the change, but they will just need to remove one line from your code.

\documentclass[lnbip]{svmultln}
\usepackage[utf8]{inputenc}
\usepackage{
  lineno,
  graphicx,
  %caption,% <---- not compatible with Springer classes
  color,
  %amsthm, % <---- not compatible with Springer classes
  float,   % <---- don't use the [H] option
  makeidx,
  hyperref,% <---- should be last
}

\modulolinenumbers[5]

%%% No period after theorem labels
\makeatletter
\renewcommand*{\@thmcounterend}{}
\makeatother

\spnewtheorem{lem}{Lemma}{\bfseries}{\itshape}

\begin{document}

\begin{lem}
Statement
\end{lem}

\end{document}

I commented some of the packages: caption, as well as amsthm, is not compatible with the class; float is usually not necessary, because one should never use the [H] option to floats. I also removed the settings to \parindent and \parskip for the same reasons as before, that is, sticking to the house style.

enter image description here