# How to ignore proofs? [duplicate]

I'd like to print a shorter version of my paper without all the proofs, I'm thinking about something like

\renewenvironment{proof}{\begin{comment}}{\end{comment}}


but that activates the comment environment right there instead of in the code.

although the suggested question, How to redefine an environment to produce no output?, does offer ideas, it's not obvious that it's perfect.

here's an attempt to use the comment package in the way requested.

\documentclass{article}
\usepackage{amsthm}
\usepackage{comment}
%\excludecomment{proof}
\begin{document}
some text

\begin{proof}
proof text
\end{proof}

more text

\begin{proof}%
[Second proof]
more proof text
\end{proof}

still more text
\end{document}


if the \excludecomment directive is uncommented, indeed all proofs do disappear. but there is one limitation that is mainly a nuisance:

• if no blank lines appear before or after the proofs, all the surrounding text is run together.

in a first attempt, i assumed that it wouldn't be possible to simply specify proof as the "comment" to be excluded, so didn't even try it. (i was wrong.) instead, i defined an alternate form:

\specialcomment{myproof}{\begin{proof}}{\end{proof}}


and labeled the proofs as myproof instead of simply as proof, with the following adverse result:

• an alternate proof header, e.g. [Second proof], is not interpreted as the usual option. if this is on the same line as \begin{myproof}, it simply disappears. if on another line, with the preceding line terminated by % (as in the example code), it prints out as ordinary text.

this flaw could be fatal to your "full" presentation.

thanks to the original poster for trying out the "obvious" (and discovering that it works!), and to victor eijkhout for creating the package!

• Hi! Just adding the excludecomment did what I needed. Thanks for your detailed answer. – David Kohler May 15 '13 at 17:21
• @DavidKohler -- ohmygosh! it does work! it wouldn't have occurred to me that it could! i'll edit the answer. – barbara beeton May 15 '13 at 17:25