# No Counter Theorem1 is defined

I got an exception in the following latex code: "No Counter Theorem1 is defined", what is the problem?

\documentclass[conference]{IEEEtran}

\newtheorem{definition}[theorem1]{Definition}
\begin{document}

\title{Title}

\maketitle

\begin{abstract}
%\boldmath
The abstract goes here.
\end{abstract}

\section{Introduction}
\begin{definition}[dd]
sdfa
\end{definition}

\end{document}

-
In my case, \usepackage{cleveref} caused that error. After removing that package, everything worked as expected. – koppor Apr 1 '14 at 9:29

## 1 Answer

You have declared a new theorem type "Definition" which uses the counter of the theorem type "theorem1" -- but such a type hasn't been declared. The following works:

\documentclass[conference]{IEEEtran}

\newtheorem{theorem1}{Special Theorem}
\newtheorem{definition}[theorem1]{Definition}

\begin{document}

\section{Introduction}

\begin{theorem1}
foo
\end{theorem1}

\begin{definition}[dd]
sdfa
\end{definition}

\end{document}


-
I wouldn't use a number in the name of the type. This will break if some command try to use e.g. \thetheorem1. – Ulrike Fischer Jul 27 '12 at 10:47