I am on Ubuntu Karmic Koala using Tex-live.
I am writing a document in which I have to put chunks of code. I would like to put these in red in a box with a grey background. The following code does what I want:
Code: Select all
\documentclass{article}
\usepackage{verbatim}
\usepackage{color}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\node[left,text width=11cm, fill=gray!30,inner sep=1ex]
{\color{red!90}
\begin{verbatim}
Some code
\end{verbatim}
};
\end{tikzpicture}
\end{document}
Thanks in advance
Aurélien