Is there any method to emphasize digits with listings?
For example, I want to make the number 3.0 and 4.0 to be orange like this:
(From TensorFlow website.)
I have tried options emph and emphstyle, but they can only emphasize identifiers like int32 or node1, while pure numbers can't be emphasized.
Using the codes from Peter Grill's answer or Herbert's answer, however, digits in identifiers ('32' in int32) will also be colored. On the other hand, the dot in 3.0 is still unemphasized.

listingspackage: How can I format all numbers?; Coloring digits with thelistingspackage; How can I change the color of digits when using thelistingspackage? – Werner Jul 23 '17 at 14:123.0,-5or even1.2e3? – stone-zeng Jul 23 '17 at 15:07