# Compile only the theorems

Is there a way (package or anything) to compile only the theorems in a tex-document. With theorems I mean the lemmas, propositions and theorems defined in the theorem-environment of the amsthm package. I would like to have a list of the results to see the underlying structure better.

• You could redefine the theorem/lemma/etc. environments to write their content to a new file. May 27 '14 at 11:57
• An option could be the preview package, but you get a page for each environment you declare to be included in the preview. May 27 '14 at 12:22
• The answer at tex.stackexchange.com/questions/91188/… implements @HenriMenke 's idea using awk rather than redefinitions. May 27 '14 at 12:27

Try xcomment package:
\usepackage{xcomment}