# customization of theorem, lemma, definition, … in ieeeconf

I am working with following ieeeconf-based template:

\documentclass[letterpaper, 10 pt, conference]{ieeeconf}  % Comment this line out if you need a4paper

\IEEEoverridecommandlockouts                              % This command is only needed if
% you want to use the \thanks command
\overrideIEEEmargins                                      % Needed to meet printer requirements.

\usepackage{graphics} % for pdf, bitmapped graphics files
\usepackage{epsfig} % for postscript graphics files
\usepackage{mathptmx} % assumes new font selection scheme installed
\usepackage{times} % assumes new font selection scheme installed
\usepackage{amsmath} % assumes amsmath package installed
\usepackage{amssymb}  % assumes amsmath package installed

\newtheorem{thm}{Theorem}[section]
\newtheorem{lem}[thm]{Lemma}
\newtheorem{prop}[thm]{Proposition}
\newtheorem{cor}{Corollary}
\newtheorem{defn}{Definition}[section]
\newtheorem{conj}{Conjecture}[section]
\newtheorem{exmp}{Example}[section]
\newtheorem{rem}{Remark}

\title{\LARGE \bf
My Title*
}

\author{Guy$^{1}$
\thanks{*This work was not supported by any organization}% <-this % stops a space
\thanks{$^{1}$Guy is with Hell,
{\tt\small guy@hell.edu}}%
}

\begin{document}

\maketitle
\thispagestyle{empty}
\pagestyle{empty}

\begin{abstract}

ABSTRACT

\end{abstract}

\section{INTRODUCTION}

\begin{thm}
My theorem is blaw.
\proof Here is the proof.
\end{thm}

\begin{lem}
My lemma is blaw.
\proof Here is the proof.
\end{lem}

\begin{defn}
Look at my definition.
\end{defn}

\begin{thebibliography}{99}

\bibitem{c1} G. O. Young, ÒSynthetic structure of industrial plastics (Book style with paper title and editor),Ó    in Plastics, 2nd ed. vol. 3, J. Peters, Ed.  New York: McGraw-Hill, 1964, pp. 15Ð64.

\end{thebibliography}

\end{document}


As you can compile the MWE, I don't like the formation and style of my logic environments, and I'd like to change them to be shown something like below:

(All environments needs to be bold, with numerals to address them. Lemma and theorem must be ended with a black square and so on.)

But as I try to customize the style with \newtheoremstyle{plain} and using amsthm package, an error will be raised as following:

! LaTeX Error: Command \proof already defined.

Update 1: Adding \let\proof\relax did not lead to error-free compilation.

Update 2: @egreg's answer does still throw the error on my machine, as following:

Update 3: Here is my IEEEconf version from log file: Document Class: ieeeconf 2016/4/23 revision V1.6b by Pradeep Misra

• Try with \let\proof\relax \usepackage{amsthm} ... – Werner Jan 14 '17 at 20:13
• @Werner: It didn't work, appropriately. Please find the update. – Roboticist Jan 14 '17 at 20:16
• I can compile your document if I remove \IEEEoverridecommandlockouts and \overrideIEEEmargins from the preamble and add \usepackage{amsthm}. That is, I can add \usepackage{amsthm} without raising the error you mention. – Werner Jan 14 '17 at 20:19
• @Werner: The problem is not with adding \usepackage{amsthm} or removing those two commands from the preamble (the file will be compiled perfectly), but adding \newtheoremstyle{plain} for final customization is the thing that does not work, though. – Roboticist Jan 14 '17 at 20:23
• You must not use \proof, but \begin{proof}...\end{proof} outside the theorem statement. – egreg Jan 14 '17 at 20:27

1. The class name is IEEEconf with the first part capitalized. Calling it ieeeconf works on Windows, but not on other systems

2. The epsf package should not be used in new documents. If the people at the conference tell you to, they are lagging twenty years behind.

3. Don't use \bf in any document. Formatting instructions like \LARGE in the argument to \title will just annoy the copy editors.

4. Loading times after mathptmx is redundant (and maybe even dangerous).

5. \IEEEoverridecommandlockouts and \overrideIEEEmargins aren't defined in the current version of IEEEconf.

6. Loading amsthm in an IEEEconf class is perfectly fine.

The main problem is how you are calling proof: it should not be

\begin{thm}
My theorem is blaw.
\proof Here is the proof.
\end{thm}


but

\begin{thm}
My theorem is blaw.
\end{thm}
\begin{proof}
Here is the proof.
\end{proof}


Here's an example, massaged to be compilable.

\documentclass[letterpaper, 10pt, conference]{IEEEconf}

\usepackage{graphicx}
\usepackage{mathptmx}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}

\renewcommand{\qedsymbol}{$\blacksquare$}

\newtheorem{thm}{Theorem}[section]
\newtheorem{lem}[thm]{Lemma}
\newtheorem{prop}[thm]{Proposition}
\newtheorem{cor}{Corollary}
\newtheorem{conj}{Conjecture}[section]
\theoremstyle{definition}
\newtheorem{defn}{Definition}[section]
\newtheorem{exmp}{Example}[section]
\newtheorem{rem}{Remark}

\title{My Title*}

\author{Guy$^{1}$
\thanks{*This work was not supported by any organization}% <-this % stops a space
\thanks{$^{1}$Guy is with Hell, {\tt\small guy@hell.edu}}%
}

\begin{document}

\maketitle
\thispagestyle{empty}
\pagestyle{empty}

\begin{abstract}

ABSTRACT

\end{abstract}

\section{INTRODUCTION}

\begin{thm}
My theorem is blaw.
\end{thm}
\begin{proof}
Here is the proof.
\end{proof}

\begin{lem}
My lemma is blaw.
\end{lem}
\begin{proof}
Here is the proof.
\end{proof}

\begin{defn}
Look at my definition.
\end{defn}

\begin{thebibliography}{99}

\bibitem{c1} G. O. Young, ÒSynthetic structure of industrial plastics (Book style with paper title and editor),Ó    in Plastics, 2nd ed. vol. 3, J. Peters, Ed.  New York: McGraw-Hill, 1964, pp. 15Ð64.

\end{thebibliography}

\end{document}


• I copied and pasted your answer to be compiled, completely, But the proof's issue does still exist! (Please find update 2) – Roboticist Jan 14 '17 at 20:45
• @Roboticist I feel you have quite an old version of IEEEconf.cls. Where did you get it? – egreg Jan 14 '17 at 20:50
• Actually, I'd reinstalled it right now from my MikTeX Package Manager, but nothing's changed. (The new installation date is 2017-01-14, now). It must be latest version, reasonably. – Roboticist Jan 14 '17 at 20:55
• @Roboticist Yes. It's definitely not the official IEEEconf on CTAN. Sorry, but without knowing where you got it, it's impossible to help. Unfortunately, it seems there's a plethora of ieeeconf.cls around the Web. – egreg Jan 14 '17 at 21:23
• @Roboticist Before the line where you got the information about the class there should be the path to it: can you please show it? – egreg Jan 14 '17 at 21:30

I had exactly the same problem. My solution was to add let\proof\relax \let\endproof\relax before \usepackage{amsthm}.

Side note: The official version of ieeeconf can be found at http://css.paperplaza.net/conferences/support/tex.php. It seems that the version IEEEconf 2009/04/05 v1.4 IEEE Computer Society 8.5x11 is only for the computer science society and the style differs from the version I am referring to. In the file ieeeconf.cls there is a section called ENVIRONMENTS where you can see which commands are being defined.