views:

34

answers:

1

Is it possible to tag sections of your .tex file so that you can make text appear or not?

I have a long document and would like to be able to comment a certain section in each chapter, and produce two different pdfs, one with the comments, and one without.

I read here about the \begin{comment} tag in the verbatim package. Is it possible to make this appear if I redefined the comment tag? How is this done?

Thank you.


On suggestion, included the question to tex.stackexchange.com here, however there is not much traffic on that site.

A: 

Answer provided by: http://stackoverflow.com/users/1968/konrad-rudolph on tex.stackexchange.com

Yes, this is indeed possible, and it’s very simple, too: just redefine the comment environment as follows:

\renewenvironment{comment}{}{}

This will cause the comment text to be included as normal text.

celenius