0

Trying to put my paper into LNCS format and I'm having a weird error if I comment out the line \newtheorem{prop}[theorem]{Proposition} it tells me prop is undefined but if I uncomment the line it tells me it is already defined.

\documentclass[runningheads]{llncs}
\usepackage{thm-restate}

%\newtheorem{prop}[theorem]{Proposition}
\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{prop}
    dsafdf
\end{prop}
\end{document}

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

1 Answer 1

2

LLNCS already defines a Proposition theorem environment, you should use \begin{proposition} ... \end{proposition} instead of defining your own. It has the advantage of properly localizing to various languages.


That said, the issue with prop is not a conflict with LLNCS, but with thm-restate. And it is not really that the environment prop has been defined, but that there is a bug in how thmtools is trying to latch onto the LLNCS macros and provide its own interpretation of stuff.

I've been able to isolate the bug to the file thm-llncs.sty; the specific error is coming from the call to \thmt@newtheorem@predefinition in the definition of \thmt@spnewtheoremiv. (This part I am sure about.)

The problem, I think (the following is a guess, which may be incorrect), is that as part of the ...predefinition, it calls ...autorefsetup, which creates a counter-alias when sibling counters are used. But then the original \spnewtheorem from the Springer LLNCS file is called, which tries to create the counter again.

One can check that without specifying a sibling counter, commands such as \newtheorem{prop}{Proposition}, or \declaretheorem[name=Proposition]{prop}, or \spnewtheorem{prop}{Proposition}{\bfseries}{\itshape} all work as expected, but as soon as you specify a sibling counter everything breaks.

You should file a bug with the thmtools maintainers linking to this post and ask them to fix it.

5
  • Okay whats the easiest way to fix this?
    – Hao S
    Commented Oct 30, 2023 at 6:56
  • 1
    The easiest way to fix any and all thmtools related errors is to not use thmtools. // If you don't intend to use the autoref features from hyperref, you can make a local copy of thmtools.sty in your working directory and find the line where it \RequirePackge the file thm-autoref; delete the reference to thm-autoref. This should in principle work (but I haven't tested for whether it breaks other things). Commented Oct 30, 2023 at 7:12
  • But seriously: file a bug report at github.com/muzimuzhi/thmtools/issues the maintainers know the code better than I do, and they should be able to give you a better workaround, if not a complete fix. Commented Oct 30, 2023 at 7:13
  • How do I do restatable without thmtools?
    – Hao S
    Commented Oct 30, 2023 at 7:17
  • Try egreg's code here: tex.stackexchange.com/a/336981/119 You will need to make appropriate changes (egreg assumes that one is repeating a theorem, if you are repeating a proposition you need to change a bunch of things, e.g. \thetheorem -> \theproposition.) Commented Oct 30, 2023 at 7:27

You must log in to answer this question.

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