TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In other words, I'd like to have the comment environment of the verbatim package "inverted". I am pretty sure I read about some package allowing this some time ago, but I can't recall its name (nor can I Google it), and I don't want to reinvent the wheel...

share|improve this question
Also note: there is also the comment package which allows you to define your own comment environments and enable or disable them. – Martin Scharrer May 19 '11 at 17:11
I know that, but still this is not what I want. But thanks anyway! – mbork May 19 '11 at 17:30
up vote 6 down vote accepted

OK, so I found it myself. It is the xcomment package. (From a glance at the code I suppose that it's an old, LaTeX 2.09 style file, but it seems to work fine with LaTeX2e.)

share|improve this answer
A small code example would be great. – Martin Scharrer May 14 '12 at 10:32

The preview package provides a preview environment and when active (active option) only displays the content in such environments. However, every environment is placed on its a page of its own, which might not what you want.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.