Possible Duplicate:
Commenting out large sections
I am writing a document and I want to prepare two versions.
Version 1 will contain the 'text'. Version 2 will contain the 'text' as well paragraphs of 'commentary'. The layout will interlace the two types of text e.g:
text paragraph
commentary paragraph
text paragraph
commentary paragraph and so on.
Ideally, I would be able to produce the two versions from one source file by simply altering a parameter in the preamble. I imagine that I might be able to create an environment called commentary (or similar) such that all instances on the commentary environment can be hidden by altering a statement in the preamble.
I hope this makes sense I am relatively new to latex.
\paryou probably might be able to obtain what you want (i.e., hiding every other paragraph) automatically. This, however, might not work when using anything else than text (from figures to enumerations). – mbork Dec 14 '12 at 14:43extractpackage, which might be even better for you; it allows e.g. to generate a second LaTeX file, with only specified environments. – mbork Dec 14 '12 at 14:44