0

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:

enter image description here

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

Your Answer

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

Browse other questions tagged or ask your own question.