21

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}

1
  • The class defines no theorem-like environment. Use \newtheorem.
    – egreg
    Commented Jun 26, 2012 at 15:14

1 Answer 1

21

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}​
5
  • 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
    Commented Oct 10, 2013 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
    Commented Oct 10, 2013 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
    Commented Oct 11, 2013 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
    Commented Oct 11, 2013 at 3:37
  • 1
    @hengxin: I suggest asking a follow-up question.
    – Werner
    Commented Oct 27, 2013 at 6:29

You must log in to answer this question.

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