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

How could I set up a verbatim-environment which has

  • black background
  • white text in scriptsize ?
share|improve this question
use the listings package. – Yiannis Lazarides Jan 15 '11 at 19:38
I did, but there it gives me small white lines between each textline. And on the other hand, there seems to be no other way to have completely white text within listings than \color{white}\begin{listing}...\end{listing}\color{black} – Produnis Jan 15 '11 at 19:40
up vote 9 down vote accepted

Here is a solution inspired by the code of the moreverb package and using code lines of it:

    \hsize=\wd0 \the\verbatim@line\par}}%
  \setbox0=\vbox\bgroup \verbatim


alt text

share|improve this answer
Thanks Stefan,this is exactly what I was looking for! – Produnis Jan 16 '11 at 10:11

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.