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


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)

| improve this answer | |
  • You should mark this as the answer (if thats possible for your own posts) – Mythio Feb 21 '13 at 15:10
  • Yes, I tried. But I can only do so in 2 days it says. But I will as soon as the system let's me to. – navige Feb 21 '13 at 15:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.