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

I have to write a small demonstration of some features of my package. I was thinking about doing something like:







But this isn't working, because of listings can't be used inside commands. Any nice solution? (Would like to have a left right comparison between source and result)

And is there some way to enclose this so that nothing outside is affected?

share|improve this question
up vote 3 down vote accepted

You can use and set the listings parameter in the usual way:




enter image description here

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.