Hallo,
kann mir jemand sagen was ich falsch mache ?
In meinem Quellcode werden die Kommentare nicht farbig angezeigt. Das mit den Keywords klappt, alles andere auch.
\usepackage{color}
\usepackage{listings}
\lstloadlanguages{C}
\lstset{numbersep=8pt,stepnumber=1,firstnumber=1,numbers=left,
numberstyle=\footnotesize,captionpos=t}
\lstset{basicstyle={},%\ttfamily,
keywordstyle=\bfseries\color{red},
commentstyle=\itshape\color{green},
stringstyle=\color{lightgrey}}
\lstset{emph={proctype,init, atomic, run, chan, mtype, typedef, if, fi, do, od, else, #define, active, assert, break, next, MODULE, VAR, ASSIGN, case, esac, DEFINE },%
sensitive=false,%% Gross- oder Kleinschreibung erlaubt
frame=bt,
emphstyle=\color{red},
basicstyle=\tt,
}
dann das Dokument..
\begin{lstlisting}[basicstyle=\small\ttfamily\upshape,caption={Aufzug.smv}\label{lst:smv}]
%ttttt
/*kkkk*/
MODULE Button(reset)
// Variablendeklaration
VAR
\end{lstlisting}
kann mir jemand sagen was ich falsch mache ?
In meinem Quellcode werden die Kommentare nicht farbig angezeigt. Das mit den Keywords klappt, alles andere auch.
\usepackage{color}
\usepackage{listings}
\lstloadlanguages{C}
\lstset{numbersep=8pt,stepnumber=1,firstnumber=1,numbers=left,
numberstyle=\footnotesize,captionpos=t}
\lstset{basicstyle={},%\ttfamily,
keywordstyle=\bfseries\color{red},
commentstyle=\itshape\color{green},
stringstyle=\color{lightgrey}}
\lstset{emph={proctype,init, atomic, run, chan, mtype, typedef, if, fi, do, od, else, #define, active, assert, break, next, MODULE, VAR, ASSIGN, case, esac, DEFINE },%
sensitive=false,%% Gross- oder Kleinschreibung erlaubt
frame=bt,
emphstyle=\color{red},
basicstyle=\tt,
}
dann das Dokument..
\begin{lstlisting}[basicstyle=\small\ttfamily\upshape,caption={Aufzug.smv}\label{lst:smv}]
%ttttt
/*kkkk*/
MODULE Button(reset)
// Variablendeklaration
VAR
\end{lstlisting}