Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I get this error Command \theorem already defined. when I try to define \newtheorem{theorem}{Theorem} within a document with the llncs documentclass.

My minimal example is here:

\documentclass[article]{llncs}

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

\begin{document}
\newtheorem{theorem}{Theorem}


\begin{theorem}[Test]\label{thm:test}
\end{theorem}
\end{document}
share|improve this question
1  
I don't think one has to load amsthm with the llncs class, which also has its proof environment. And for defining new theorems, there's the command \spnewtheorem described in the class documentation. The theorem environment is predefined. –  egreg Sep 10 '13 at 15:10
    
Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. –  Heiko Oberdiek Sep 10 '13 at 15:24

1 Answer 1

The class already has its own theorem and proof structures defined, so your \newtheorem is causing an error since tries to define commands already defined. This class implements its own commands for theorem-like structures, so I wouldn't use amsthm here:

\documentclass[article]{llncs}

\begin{document}

\begin{theorem}[Test]
test
\end{theorem}

\begin{proof}[Test]
test
\end{proof}

\end{document}

enter image description here

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.