2

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.

  • Welcome to TeX.sx! I suggest you to look at this answer: http://tex.stackexchange.com/a/62096/4427 – egreg Dec 14 '12 at 14:32
  • I believe that does exactly what I want! thanks kindly egreg! – Kindergarten Cop Dec 14 '12 at 14:42
  • Also, I imagine that using some trickery with redefining \par you 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:43
  • 1
    There is also an extract package, 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
  • @KindergartenCop I suggest to close this question as duplicate, then, with a link to the other question and answer. – egreg Dec 14 '12 at 14:53
  • is that something I should do, or is that something an admin would have to do? In any case I agree. Despite my efforts to find the answer by search it is very similar to the other question – Kindergarten Cop Dec 14 '12 at 14:56
  • @KindergartenCop You don't have to do anything. We're waiting for other contributions from you to the site. – egreg Dec 14 '12 at 15:00

0 Answers0