I would like to use the same Latex source file for both my document and the accompanying slides.
When creating a document it's easy to hide the slide sections by doing this:
\newcommand{\slide}[1]{}
However, how do I do the inverse, i.e. How can I only generate the slides and hide the rest of the document if I want to print only my slides? Basically I want to say, if the content does not fall in a slide area, then don't show it.
Unfortunately I don't have a simple example to show, because I honestly don't know where to start.

Beamerfeature to generate notes and slides in one document? A while ago I created a blog article on this (in German) http://uweziegenhagen.de/?p=1053 – Uwe Ziegenhagen Oct 14 '14 at 07:23