# listing and Scilab code

I want to insert Scilab code in a listing environment

\begin{lstlisting}[]
function y = f(x)
y = 1/sqrt(2*\%pi) * exp(-x^2/2)
endfunction
\end{lstlisting}


but it then displays "\%" whereas I would like it to display "%" only ... Has anyone ever encountered this problem?

thanks !

lslisting environment is similar to verbatim environment. So just use %:

\documentclass{article}
\usepackage{listings}             % Include the listings-package
\begin{document}

\begin{lstlisting}[]
function y = f(x)
y = 1/sqrt(2*%pi) * exp(-x^2/2)
endfunction
\end{lstlisting}
\end{document}


I found !

just write

%


it sounds like a comment, but is not interpreted...