Source code highlighting in LaTeX
I need to highlight source code in LaTeX. The package listings seems to be the best choice for most use-cases and for me it was, until now. However, now I need more flexibility. Generally, what I’m looking for is a real lexer. In particular, I need (for an own language definition) to define (and highlight!) own number styles. listings does not allow highlighting numbers in code. However, I need to produce something like this: listings also cannot cope with arbitrary delimiters for strings. Consider the following valid Ruby code: s = %q!this is a string.! Here, ! can be replaced by almost any