[Tex/LaTex] How to typeset Greek letters in listings

greeklistings

Is it possible (and if yes, of course how) to use Greek letters within lstlisting (of the listings package)? However, \epsilon, for instance, puts of course exactly that and not a Greek epsilon.

I have read in the documentation that it is possible to write e.g. Greek comments, but that is not what I want to do. I'm using lstlisting to write EBNF and would like to use an \epsilon for "empty".

Best Answer

Thanks to Mythio, I found the answer:

Use texcl=<true|false> or mathescape=<true|false> to use the inline math-evironment $\epsilon$ (see section 4.14 of the documentation)

Related Question