20

I have an IEEEtran document class. I want to put a simple definition inside the document:

\begin{definition}
blab bla
\end{definition}

I am getting the error below:

Environment definition undefined. \begin{definition}

  • The class defines no theorem-like environment. Use \newtheorem. – egreg Jun 26 '12 at 15:14
20

IEEEtran defines its own environments which is used to replace existing ones (like enumerate, itemize, etc.). However, it doesn't define any definition environment. You can do so by using \newtheorem:

enter image description here

\documentclass{IEEEtran}% http://www.ctan.org/pkg/ieeetran
\newtheorem{definition}{Definition}
\begin{document}
\begin{definition}
Here is a definition.
\end{definition}
\end{document}​
  • 1
    I prefer to the \theoremstyle{break} in the package ntheorem. However, if I use this in IEEEtran, its theorem/definition numbers are prefixed by the Roman section number (II.5) instead of original Arabic number (2.5). How can I get both 2.5 and the break style? – hengxin Oct 10 '13 at 13:20
  • @hengxin: I assume your sections are also enumerated in Roman numerals. You can change the section numbering to be Arabic via \renewcommand{\thesection}{\arabic{section}}, or you can just have Arabic section numbering in the theorems via \renewcommand{\thetheorem}{\arabic{section}.\arabic{theorem}}. Then your numbering will be inconsistent though. Does this work? – Werner Oct 10 '13 at 14:12
  • I tried \usepackage[thmmarks]{ntheorem} \theoremstyle{break} \newtheorem{theorem}{Theorem}[section] \renewcommand{\thetheorem}{\arabic{section}.\arabic{theorem}} in IEEEtran and I got only the number "1.0": (1) Roman section numbering (2) no the keyword "Theorem"; (3) counting goes from 0 instead of 1; (4) no break style. Did I make mistakes? BTW, I decided to follow IEEEtran's default environment: (1) Roman section numbering (2) Arabic.Ababic theorem numbering (3) no break style. Thank you all the same. – hengxin Oct 11 '13 at 1:54
  • hum, I still prefer to the following theorem environment in IEEEtrans: (1) Roman section numbering (2) with keywords "Theorem"/"Definition" in bold (3) no indent of the keywords (4) Arabic.Arabic theorem numbering (5) with break style (6) counting goes from 1 within each section. So, I am demanding too much. Thanks a lot. – hengxin Oct 11 '13 at 3:37
  • 1
    @hengxin: I suggest asking a follow-up question. – Werner Oct 27 '13 at 6:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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