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

Possible Duplicate:
How best to include programming source code in LaTeX documents?

What is a good way to display program source like c++/lisp code in a latex document?

share|improve this question

marked as duplicate by TH., Hendrik Vogt, Caramdir, Stefan Kottwitz Dec 24 '10 at 16:35

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

There are many questions on this site that deal with this. You should search. – TH. Dec 23 '10 at 8:21
up vote 3 down vote accepted

see package listings=> run texdoc listings

share|improve this answer

Use the minted package.

share|improve this answer

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