Sorry.
Hier zum selber Testen:
Code:
\documentclass{article}
\usepackage{listings}
\usepackage{color}
\begin{document}
\lstset{language=OCL, numbers=left, numberstyle=\tiny, numbersep=5pt, framexleftmargin=5mm, breaklines=true,
keywordstyle=\bfseries\colorbox{green},
keywordstyle=[2] \bfseries\colorbox{yellow},
keywordstyle=[3] \bfseries\colorbox{red}}
\begin{lstlisting}[linerange={1-7}, caption=Test, frame=single, frameround=ftft, linewidth=4cm, ]
Dies ist Text ohne Keywords usw., etc. s.u. \dots
context,pre,inv,post
or,xor,and,not,implies,if,then,else,endif
Und zwischendurch noch Mal etwas Text ohne Hervorhebungen. Man beachte den Zeilenabstand ohne Fehler und ohne Lücken im Rahmen
Boolean,Integer,Real,String,Set,Sequence,Bag
--some Comment
\end{lstlisting}
\end{document}
Lesezeichen