I want a piece of code to be monospaced. So I do the following. Commands are highlighted in Eclipse. But as soon as I type \verbatim all inside and the color of the command itself become gray.
\begin{verbatim}
public class main {
public statik void main (string[] args){
for(int i = 0; i < arg.length; i ++){
System.out.println(args[i]);
}
}
};
\end{verbatim}
The following packages are included. \usepackage{verbatim} \usepackage{alltt}
What am I doing wrong?