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 am using listings package for code highlighting and I want to have a different color frame around my code examples. Any ideas how to do it? There is backgroundcolor but there isn't framecolor so I can't figure out how to do it.

share|improve this question
I found it, it was rulecolor. – Peteris Krumins Apr 30 '11 at 0:48
You can answer it yourself and accept it. – Leo Liu Apr 30 '11 at 1:18
It's fine to put this as an answer (maybe with a small example document to show others who have this question.) – Alan Munn Apr 30 '11 at 1:20
up vote 5 down vote accepted

The answer has been given above. But to have at least an answer to this question I'll give an example how to use rulecolor:

echo 'Hello World!';

enter image description here

share|improve this answer
Thanks for the full example. – Peteris Krumins May 2 '11 at 8: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.