For my project, I've been using the
listings package in order to color the keywords, comments, strings, and digits in the code.
The thing is, I've managed to color the keywords, comments and strings, however, I couldn't color the digits within the code without coloring those in the comments/strings.
I've tried using the solution proposed in Coloring digits with the listings package; however, it didn't work. The digits weren't colored in the strings, but they were in the comments.
Would you be kind to suggest me a solution?