10

I am writing a paper and I will prove a theorem in an appendix because the proof is lengthy. When I use the following code,

\documentclass[journal]{IEEEtran}
\usepackage{amssymb, amsmath, amsthm, amsfonts}
\renewcommand*{\proofname}{}

\begin{document}

\appendices
\section{Proof of Theorem \ref{theorem1}}

\begin{proof}
We will use induction to prove this theorem.
\end{proof}
\end{document} 

I get the following:

enter image description here

I would like to remove the word "Proof:" from the proof as this is already explained in the name of the appendix.

I have checked the question How to change the word “Proof” in the proof environment?. I tried to change the name to be blank using

\renewcommand*{\proofname}{}

However this does not seem to work.

BHamza
  • 351

2 Answers2

14

Use this code

\begin{proof}[\unskip\nopunct]

\end{proof}

A full example:

\documentclass[journal]{IEEEtran}
\usepackage{amssymb, amsmath, amsthm, amsfonts}

\usepackage{showframe} % just to show the margins

\newtheorem{thm}{Theorem}

\begin{document}

\begin{thm}\label{theorem1}
Toasters can fly.
\end{thm}

\appendices
\section{Proof of Theorem \ref{theorem1}}

\begin{proof}[\unskip\nopunct]
We will use induction to prove this theorem.
\end{proof}
\end{document}

enter image description here

egreg
  • 1,121,712
Karo
  • 457
  • 1
    This does not work, it removed the word but not the colon. I am left with

    : We will use induction ....

    – BHamza May 30 '14 at 11:23
  • 3
    Add also \unskip before \nopunct. – egreg May 30 '14 at 11:24
  • @BHamza Remove the \renewcommand{\proofname}{} line. – egreg May 30 '14 at 11:24
  • @egreg Removed the line, and used the \nopunct it indented the first line to the left, but the colon still exist. Thank you. – BHamza May 30 '14 at 11:26
  • @BHamza If you type \begin{proof}[\unskip\nopunct] you should be on your way. – egreg May 30 '14 at 11:30
  • 1
    I've taken the liberty of adding a MWE in order to show that your suggestion works. Welcome to TeX.SX! Good answer! – egreg May 30 '14 at 11:38
  • I am sorry, I thought it is working, but the colon is still there. I do not understand why it does not produce the same output as yours. – BHamza May 30 '14 at 11:59
  • You are using TexLive or online editors? I tested it over link and link and it works. – Karo May 30 '14 at 12:23
  • @egreg -- this is, of course, the "logical" answer, but with tex live 2012 it does not work; it leaves the colon, as reported. and, though it probably doesn't matter, the qed box is a black, not open, square. so it's advisable to make sure that the class and all packages are the most recent ones. (didn't test that.) – barbara beeton May 30 '14 at 12:31
  • @barbarabeeton I tested it also with TL2012 and it works. – egreg May 30 '14 at 12:42
  • I am using WinEdt. The colon is still there. What should I do? – BHamza May 30 '14 at 12:43
  • @egreg -- i've taken this off-line. expect email. – barbara beeton May 30 '14 at 13:12
  • @egreg, Can you help because the question has not yet been answered. How can I remove the colon?! – BHamza Jun 03 '14 at 14:02
  • @BHamza As you can see, I get no colon, so I can't tell you how to remove it. – egreg Jun 03 '14 at 14:06
  • @BHamza You are probably running an old TeX distribution; I get the colon if I use TeX Live 2011 (or older) together with a warning ATTENTION: \proof is deprecated (line 17). Use \IEEEproof instead. Can you confirm? – egreg Jun 03 '14 at 14:16
  • @BHamza I've added an answer for solving your problem; but you should upgrade your TeX distribution. – egreg Jun 03 '14 at 14:45
4

In addition to Karo's answer, which is perfect for IEEEtran.cls version 1.8 released on 2012-12-27 (which is included in up-to-date TeX Live 2012 distributions and in TeX Live 2013 and later), I'll add a workaround for previous versions of the class:

\documentclass[journal]{IEEEtran}
\usepackage{amssymb, amsmath, amsthm, amsfonts}

\usepackage{showframe} % just to show the margins

\newtheorem{thm}{Theorem}

%% define a \killproofname command that works with both
%% IEEEtran.cls version 1.7a or version 1.8
\makeatletter
\@ifclasslater{IEEEtran}{2012/12/26}
 {\newcommand{\killproofname}{\unskip\nopunct}}
 {\newcommand{\killproofname}[1]{\unskip\aftergroup\ignorespaces\ignorespaces}}
\makeatother


\begin{document}

\begin{thm}\label{theorem1}
Toasters can fly.
\end{thm}

\appendices
\section{Proof of Theorem \ref{theorem1}}

\begin{proof}[\killproofname]
We will use induction to prove this theorem.
\end{proof}
\end{document}

Here's the result compiling with TeX Live 2011, which has IEEEtran.cls version 1.7a, released on 2007/03/05:

enter image description here

egreg
  • 1,121,712