# How can I typeset Greek letters in listings?

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".

-
It might help you to check out the documentation of the package, specifically section 4.14 about escaping to LaTeX. ftp.snt.utwente.nl/pub/software/tex/macros/latex/contrib/… –  Mythio Feb 21 '13 at 14:28
Thanks! There's the answer. For future reference, I added an answer to the question. –  navige Feb 21 '13 at 14:34
Another example tex.stackexchange.com/a/8860/963 –  Yiannis Lazarides Sep 14 at 13:09

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