5

Trying to put my paper into LNCS format and I don't know what the source of the error here is

\documentclass[runningheads]{llncs}
\usepackage{amsmath,amsthm,amssymb}
\usepackage[algosection,ruled,lined,linesnumbered,longend]{algorithm2e}
\usepackage{hyperref}
\usepackage{cleveref}
\usepackage{thmtools}
\begin{document}
\title{Contribution Title\thanks{Supported by organization x.}}
\maketitle              
\begin{abstract}
The abstract 
\end{abstract}
\section{First Section}
\subsection{A Subsection Sample}
Please note 
\end{document}

LNCS file available here https://www.overleaf.com/read/ygfkzwkxjhbw#d20610

4
  • 1
    Insert \let\proof\relax \let\endproof\relax before \usepackage{amsmath,amsthm,amssymb}.
    – Mico
    Commented Oct 29, 2023 at 19:25
  • @Mico That gives me a missing \begin{document} error.
    – Hao S
    Commented Oct 29, 2023 at 21:03
  • I get no such error message. Check if you've inserted a different command that tries to typeset something.
    – Mico
    Commented Oct 29, 2023 at 22:14
  • @Mico Ah my mistake I leftout the second relax
    – Hao S
    Commented Oct 30, 2023 at 1:13

1 Answer 1

4

The llncs class has its own way to define theorem-like environments and doesn't like to be called together with amsmath.

It already defines a proof environment, namely

\spnewtheorem*{proof}{Proof}{\itshape}{\rmfamily}

In a quite contrived way, this ensures that if \proofname is defined (possibly by a language definition file), it is used for labeling the proof.

Springer's house style seems to be of not generally adding a QED symbol; I checked Lang's “Algebra” and Hartshorne's “Algebraic Geometry”, which haven't QED symbols; to the contrary, Massey's “Singular Homology Theory” has Q.E.D. at the end of the line.

My suggestion is to load amsthm just for its proof environment and to not load thmtools, but to rely on Springer's \spnewtheorem command for defining your theorem-like environment (or using the predefined ones)

theorem case conjecture corollary definition example exercise
lemma note problem property proposition question solution remark

Load amsthm last and don't load thmtools.

\documentclass[runningheads]{llncs}
\usepackage{amsmath,amssymb}
\usepackage[algosection,ruled,lined,linesnumbered,longend]{algorithm2e}
\usepackage{hyperref}
\usepackage{cleveref}

\let\proof\relax\let\endproof\relax
\usepackage{amsthm}

\begin{document}

\title{Contribution Title\thanks{Supported by organization x.}}
\maketitle
\begin{abstract}
The abstract
\end{abstract}

\section{First Section}
\subsection{A Subsection Sample}
Please note

\begin{proof}
abc
\end{proof}

\end{document}

enter image description here

2
  • 1
    If the OP wants to use the cleveref package to create cross-references to theorem-like environments, amsthm should be loaded before cleveref. (This may or may not be relevant if the OP ends up using the \spnewtheorem machinery.)
    – Mico
    Commented Oct 29, 2023 at 22:15
  • 1
    @Mico My experiment shows that \spnewtheorem defined environments work out of the box with cleveref. I wanted to say that \newtheorem should not be used within llncs. The only part used of amsthm is proof that has no relationship with cleveref.
    – egreg
    Commented Oct 29, 2023 at 22:56

You must log in to answer this question.

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