11

I am writing my thesis,

and i am in restructuring phase - sorting theorems where they should belong thematically. And it would be helpful to have all the proofs hidden so i am not laden with the additional information.

Is it possible to add something like hideproof to documentclass options to omit them when compiling the latex file.

1

1 Answer 1

22

You can put this code to the very end of your preamble:

\usepackage{environ}
\NewEnviron{killcontents}{}
\let\proof\killcontents
\let\endproof\endkillcontents

It defines the environment killcontents that kills its contents, and then "maps" proof environment to killcontents.

4
  • Won't just \newenvironment{killcontents}{}{} do, so you don't need the environ package? Also, I don't think there is a second {} for \NewEnviron Mar 4, 2012 at 18:26
  • @PeterGrill No. Such environment would do nothing, i.e. leave its contents as is. And you are right, the second {} is a non-sense, edited.
    – yo'
    Mar 4, 2012 at 22:15
  • Duhhh??? Don't know what came over me. Must have been a momentary lapse of reason. Mar 4, 2012 at 23:28
  • It was very helpful for me. Great!
    – nichas
    Oct 13, 2012 at 18:01

You must log in to answer this question.

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