I need to integrate notes during an XML import on indesign. These notes have colors, for example from 1 to 1.9 is green, from 2 to 2.9 is yellow.
Is it possible to apply a precise color according to the note automatically imported in xml?
Thanks for your help.
I saw that it was possible to do this with GREP styles. I looked on that side, but I'm stuck setting up all the different styles automatically. I don't know anything about variables. Here is a picture of what I want to do.
Hi @Mouchet0D4C ,
you need one GREP style for the "/10" and several for all color instances.
How many different ranges do you have? Nine ones for 1 to 9 ?
What do you mean by "I'm stuck setting up all the different styles automatically"?
Finding a GREP pattern that matches one single color range?
Download my sample InDesign document from my Dropbox account with instances for 1 and 2.
The GREP patterns I used are very simple ones that do work only for a range from 1 to 9 at the beginning of the expression. This one, and higher, is not supported: 10,0/10 to 10,9/10.
Pattern for the smaller part, that is working with a "Positive Look Behind":
Sample pattern for the first range from 1.0 to 1.9 :
( Adobe Community Expert )
thank you very much. It works well ! 👍🏻