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.

lockstep
  • 250,273
epsilonhalbe
  • 1,020
  • Use the comment package, as discussed here: https://tex.stackexchange.com/questions/106457/how-to-redefine-an-environment-to-produce-no-output – Dan Stahlke Nov 20 '20 at 21:33

1 Answers1

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.

yo'
  • 51,322
  • 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 – Peter Grill Mar 04 '12 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 04 '12 at 22:15
  • Duhhh??? Don't know what came over me. Must have been a momentary lapse of reason. – Peter Grill Mar 04 '12 at 23:28
  • It was very helpful for me. Great! – nichas Oct 13 '12 at 18:01