Listings in Latex
From Klaus' wiki
Setup code listing like this:
\definecolor{listinggray}{gray}{0.9} \definecolor{lbcolor}{rgb}{0.9,0.9,0.9} \lstset{ backgroundcolor=\color{lbcolor}, tabsize=2, rulecolor=, basicstyle=\scriptsize, upquote=true, aboveskip={1.5\baselineskip}, columns=fixed, showstringspaces=false, extendedchars=true, breaklines=true, prebreak = \raisebox{0ex}[0ex][0ex]{\ensuremath{\hookleftarrow}}, frame=single, showtabs=false, showspaces=false, showstringspaces=false, identifierstyle=\ttfamily, keywordstyle=\color{Purple}, identifierstyle=\color{Black}, commentstyle=\color{BrickRed}, stringstyle=\color{RubineRed}, captionpos=b, } \lstloadlanguages{ % Check Dokumentation for further languages ... %[Visual]Basic %Pascal C, C++, %XML HTML, %Java, Erlang }